Hi Michael,
There is no thread dependent state in the OSG, and if you have do make
current correctly the current thread should have the context.
However, the best way to use OpenGL is one thread per context, and not
to thrash from one thread to the next, even if you've syncronized
everything. I'd suggest recoding to try and fit to this model.
Robert.
On 8/1/06, Michael Platings <[EMAIL PROTECTED]> wrote:
I'm using a single pbuffer, and drawing to it sequentially from different
threads (windows threading, not openthreads).
The drawing code goes like this:
//enable the pbuffer
wglMakeCurrent(pbufferDC, pbufferRC);
osg::update();
osg::cull();
osg::draw();
//draw a triangle to check that display lists are working
static int nList = 0;
if (nList == 0)
{
nList = glGenLists(1);
glNewList(nList, GL_COMPILE);
DrawBigTriangle();
glEndList();
}
glCallList(nList);
//disable the pbuffer
wglMakeCurrent(NULL, NULL);
In the primary thread, both the triangle and the simple OSG scene draw
perfectly. In the secondary thread only the triangle is drawn, but I don't
get any errors.
So my question is: why? Is there any thread-dependent state in OSG that
would cause it not to draw?
Thanks,
-Michael Platings
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**********************************************************************
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/