How to use mouse to move window in XZ plane in opengl -
i want move view in xz plane, when move mouse. mlon
, mlat
linear function of mouse coordinate x , y. have glutpassivemotionfunc(mouse_motion);
in main function. need in order move window view in xz plane? explanation?
void mouse_motion(int x, int y) { /* completed */ x=lon+mlon; y=lat+mlat; } // mouse_motion()
i'd start calling glutpostredisplay in mouse motion handler scene gets redrawn. redraw updated position.
opengl
No comments:
Post a Comment