How to move objects in OpenGL independently -
given have several cubes drawn on canvas, how can moved independently of each other? how define distinct onmouseup/onmousedown/onmousemove listeners each cube?
how define distinct onmouseup/onmousedown/onmousemove listeners each cube?
you have 1 pointer on screen, except in multitouch environments, or individual pointers can requested each input device.
so having 1 set of mouse event handlers kind of natual. if want distinction between objects, must creative , come way associate event position changed object. illustration clicking on it.
opengl drawing api. doesn't deal objects, doesn't know mouse is, or input events , doesn't manage scene, means won't give free candy in form of per-object-listeners. of must implemented (or 3rd party library).
opengl
No comments:
Post a Comment