Results 1 to 5 of 5

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

  1. #1
    Member Newbie
    Join Date
    May 2001
    Location
    bogota, colombia
    Posts
    42

    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?? Ive 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 its 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??

    /grodslukaren

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jun 2000
    Location
    Shreveport, LA, USA
    Posts
    1,502

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

    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.

  3. #3
    Member Newbie
    Join Date
    May 2001
    Location
    bogota, colombia
    Posts
    42

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

    Thanks Dfrey,

    But to be honest, I dont get what you are talking about... But Im sure I havnt done that. Where can I read more about that?? Ill look for it in the redbook. Do you have any examples for that??? Or where do you do that...?

    Thanks!!

    /grodslukaren

  4. #4
    Senior Member OpenGL Pro
    Join Date
    Jun 2000
    Location
    Shreveport, LA, USA
    Posts
    1,502

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

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

  5. #5
    Member Newbie
    Join Date
    May 2001
    Location
    bogota, colombia
    Posts
    42

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

    Im using wxWindows libraries (both windows and linux), but Im 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 youve got some more for me...

    /grodslukaren

Similar Threads

  1. correct matrixes
    By giugio in forum OpenGL: General
    Replies: 0
    Last Post: 03-05-2012, 04:10 AM
  2. Push and Pop Matrixes
    By dvwood in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 10-30-2008, 09:13 AM
  3. Frustum Culling with modelview and projection matrixes
    By markun in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 05-26-2003, 07:25 AM
  4. normals and matrixes
    By jacobmarner in forum OpenGL: Advanced Coding
    Replies: 6
    Last Post: 01-26-2002, 05:04 PM
  5. About matrixes
    By FoxDie in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 01-15-2001, 10:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean