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(pbufferDCpbufferRC);
 
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/

Reply via email to