Jump to content
  • Advertisement
Sign in to follow this  
pixelhead

OpenGL detecting wglsharelist support

This topic is 4056 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

Hi - I'm trying to port some code to older hardware. The working OpenGL program uses multi rendering contexts and wglShareLists(). On the older test machine running OpenGL 1.3 there seems to be problem with wglShareLists() because if multithreading is turned off, everything renders fine, albeit very slowly. With threading, it appears the rendering contexts are not shared as nothing is drawn but the frame rate drops. According to the Microsoft docs, wglShareLists requires OpenGL 1.01. wglCreateContext doesn't list any OpenGL prereq. Questions: 1) is there some other requirement for multiple rendering contexts? 2) is there a way to detect multiple rendering context support during runtime (like GLEW does for extensions)? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
There is no such thing as GL 1.01
On MS, it is supported on all drivers, everything. No need to detect anything.

1) is there some other requirement for multiple rendering contexts?

Call wglShareLists early in your program, before uploading any textures, or shader or whatever to GL.
Check for any errors.

2) is there a way to detect multiple rendering context support during runtime (like GLEW does for extensions)?

Support? It works on everything.

PS : look at more up to date stuff, like on msdn.microsoft.com
1.01 should be fixed!

Share this post


Link to post
Share on other sites
Quote:
Original post by V-man
2) is there a way to detect multiple rendering context support during runtime (like GLEW does for extensions)?

Support? It works on everything.

Small correction: it is supposed to work on everything :)

Fact is, that a lot of older OpenGL drivers (and also more recent ones, yes ATI/AMD, I'm looking at you) had or still have major trouble working with multiple contexts. We try to avoid using multiple context as far as possible for exactly this reason. Depending on what you're doing, multiple viewports and glScissor can solve the problem.

If the rendering has to be done onto separate DC's, but is not really performance critical except for the main window (eg. an OpenGL rendered GUI on floating tool windows, that is only refreshed on demand), then rendering to an FBO, reading it back to main memory, and using a GDI blit works like a charm. That is obviously a bad idea, if you require full rendering performance on all contexts.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!