extern "C" void motionCB(int x, int y) { float fx = x; float fy = y; CCEGLView* pEGLView = CCEGLView::sharedOpenGLView(); int id = 0; if(buttonDepressed) { pEGLView->handleTouchesMove(1, &id, &fx, &fy); } }
void mousePosEventHandle(int iPosX,int iPosY) { int iButtonState = glfwGetMouseButton(GLFW_MOUSE_BUTTON_LEFT); //to test move if (iButtonState == GLFW_PRESS) { CCEGLView* pEGLView = CCEGLView::sharedOpenGLView(); int id = 0; float x = (float)iPosX; float y = (float)iPosY; x /= pEGLView->m_fFrameZoomFactor; y /= pEGLView->m_fFrameZoomFactor; pEGLView->handleTouchesMove(1, &id, &x, &y); } }