only one window??? the same Modelview Matrixes...

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.

What is wrong, or what do I have to do??


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.

Thanks Dfrey,

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).]

I´m using wxWindows libraries (both windows and linux), but I´m running on windows at the moment.

I was looking a little at what you said. In each window I create, I think I create a rendering context, where I do my paintings…

well, thanks anyway, hope you´ve got some more for me…