c++openglcoordinates

OpenGL location vector


Is there a way to get an object within an openGL program to have a simple x,y,z value that I can edit, either directly or through glTranslatef etc.? I have read the models in from file, but I am looking for a simple solution to animate them, and just having an (x,y,z) struct within the object that I can update would be very handy.


Solution

  • Is there a way to get an object ...

    There are no objects in OpenGL. You tell OpenGL what to draw, it does it's thing. Pixels change on the screen, OpenGL forgets about it. If anything changes you have to redraw.