• Advertisement

Archived

This topic is now archived and is closed to further replies.

Display Lists...

This topic is 5327 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, can someone help me with this little piece of code. I am trying to create a display list that will draw an object and I keep getting ''invalid operation'' for an error. Here is the function: if( ::graphics ) { cout<<"Creating list..."; displayList = glGenLists(2); cout<

Share this post


Link to post
Share on other sites
Advertisement
Do you have a glBegin() without a glEnd() somewhere before this code gets called?

Share this post


Link to post
Share on other sites
Ok, I figured out that I didn''t create a rendering context before I ran the function; however, I want to use the display list on 2 different windows. Is this possible? When I run the program, one window (the window created first) is black and the other looks perfectly fine. Any ideas? Thanks a lot.

~Evlich

Share this post


Link to post
Share on other sites
Assuming you are using windows, look into the wglShareLists command to share the display lists between the two contexts.

Share this post


Link to post
Share on other sites
If I do that, how do I get the HGLRC if I use glut to create the window from a console program? Thanks a lot.

~Evlich

Share this post


Link to post
Share on other sites

  • Advertisement