I wonder if there is a problem to use more than one window with OpenGL
at the same time?? I´ve created a class that shows a head in different
angles. But when I try to use them, they all have the same modelviewMatrix
and projectionMatrix, even though it´s three different objects.
when I create my objects I do like this:
m_pMain3DFrame = new CDirectCanvas(this, -1, wxPoint(5,5), wxSize(250,250),MAIN);
m_pUpper3DFrame = new CDirectCanvas(this, -1, wxPoint(260,5), wxSize(122,122),UPPER);
m_pLower3DFrame = new CDirectCanvas(this, -1, wxPoint(260,133), wxSize(122,122),LOWER);
and the result of this is that the two upper OpenGL objects have the
same Matrixes as the last one.
If you are using 3 physically distinct windows, you need a physically distinct rendering context for each, and must make them current for each as you work in each. I can’t tell from the code you posted if this is being done, but it sounds like it is not.
But to be honest, I don´t get what you are talking about… But I´m sure I havn´t done that. Where can I read more about that?? I´ll look for it in the redbook. Do you have any examples for that??? Or where do you do that…?
Now that I look again at that code you posted above, I’m beginning to think that maybe you aren’t using Windows, which is what I was first thinking. What OS are you using? Linux? Be? Windows? Other? This is important because the particular function used to set the current context is different for each.
[This message has been edited by DFrey (edited 07-11-2001).]