PDA

View Full Version : context sharing



assmax
03-08-2005, 04:23 AM
heya,

say how about sharing with two contexts each on a different pixelformat, specificaly one is stereo the other is not?

Relic
03-08-2005, 07:01 AM
Just try and you'll find out?
As long as it's running on the same OpenGL implementation and the pixelformats are similar there are not many reasons for this to not work.
(Make sure the second context is not current while calling wglShareLists.)

assmax
03-08-2005, 09:03 PM
welp its not working. the problem is i don't know whether it even should work.

where can i find a good reference on the subject? the basic documentations are vague at best...

Relic
03-09-2005, 12:30 AM
There is only Microsoft's documentation. wgl functions are MS Windows specific.
If you have two pixelformats you need to have two windows. Are these spawned by the same process? If not, this ain't working.

assmax
03-09-2005, 01:55 AM
got it working.
as long as all other attributes with the exception of STEREO are the same.
i created a "shared" context with which both rendering contexts are shared one at a time. there is only one other context at any given time in adition to the "shared" one. ofcourse a new window must be created for each PIXELFORMAT, i just keep two ready and replace'em on demand.

thnx.