clintCJM

10-02-2006, 09:19 AM

I have two openGL windows: Model Window, and Axes Window. These are both 3D windows. The Model window contains a model, and the Axes window simply contains an X,Y and Z axes to show the orientation of the model. When I rotate the model in the Model window, I want the axes in the Axes window to SIMULTANEOUSLY rotate, so that it always shows the correct orientation. (I say "simultaneouly', but of course it's ok if the axes is actually rotating a split instant AFTER the model is rotated. The point is that, to the user's eye, it looks simultaneous).

FYI, I don't want to put the axes INSIDE the model window. I've got to have 2 separate windows.

I already have code written in the model window to handle the zooming, rotating, etc. Just need to sync up this Axes window.

The real issue is how to tell the Axes window that it's time to redraw. This is the part that I don't know how to do. Each time the user rotates the model in the Model Window, the Axes window needs to be told "Hey, redraw yourself". The axes window DOES have the latest rotational information. I accomplish this by saving the rotational data in memory that the Axes window has access to. Thus, the Axes window KNOWS exactly how to draw the axes. It just needs to be told to redraw the axes each time the user rotates the model in the Model window.

FYI, these 2 openGL windows are 2 separate window objects in my application. Neither is a child or parent of the other.

Thanks very much.

FYI, I don't want to put the axes INSIDE the model window. I've got to have 2 separate windows.

I already have code written in the model window to handle the zooming, rotating, etc. Just need to sync up this Axes window.

The real issue is how to tell the Axes window that it's time to redraw. This is the part that I don't know how to do. Each time the user rotates the model in the Model Window, the Axes window needs to be told "Hey, redraw yourself". The axes window DOES have the latest rotational information. I accomplish this by saving the rotational data in memory that the Axes window has access to. Thus, the Axes window KNOWS exactly how to draw the axes. It just needs to be told to redraw the axes each time the user rotates the model in the Model window.

FYI, these 2 openGL windows are 2 separate window objects in my application. Neither is a child or parent of the other.

Thanks very much.