[osg-users] OSG 3.0.1 crash in glDrawElements() under Windows Remote Desktop

63 views
Skip to first unread message

Andrew Cunningham

unread,
May 31, 2012, 12:17:01 PM5/31/12
to osg-...@lists.openscenegraph.org
When running a Windows OSG 3.0.1 application under Windows Remote Desktop the OpenGL driver defaults to the (ancient) software MS OpenGL GDI renderer v1.1. Unfortunately, I need to make the basics of our app work under RDC.

I am finding that glDrawElements ( called from void DrawElementsUInt::draw) crashes every time inside the MS OpenGL driver when given a geometry with say, 3000 elements. With smaller numbers of elements there are no problems.

This is code that works perfectly when running under accelerated drivers such as nVidia/ATI etc. I experimented with breaking up the drawing of elements into blocks of size GL_MAX_ELEMENTS_INDICES_WIN with no luck. It seems that repeated calls to glDrawElements in a loop even with a small number of elements cause the same issue.

This is almost certainly a bug in the driver, but I am wondering if anyone has a workaround that can be done at the OSG level.

Thanks

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=47976#47976





_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Simon Hammett

unread,
May 31, 2012, 3:04:04 PM5/31/12
to osg-...@lists.openscenegraph.org
On 31 May 2012 17:17, Andrew Cunningham <and...@mac.com> wrote:
When running a Windows OSG 3.0.1 application under Windows Remote Desktop the OpenGL driver defaults to the (ancient) software MS OpenGL GDI renderer v1.1.  Unfortunately, I need to make the basics of our app work under RDC.

I am finding that glDrawElements ( called from void DrawElementsUInt::draw) crashes every time inside the MS OpenGL driver when given a geometry with say, 3000 elements. With smaller numbers of elements there are no problems.

This is code that works perfectly when running under accelerated drivers such as nVidia/ATI etc. I experimented with breaking up the drawing of elements into blocks of size GL_MAX_ELEMENTS_INDICES_WIN with no luck. It seems that repeated calls to glDrawElements in a loop even with a small number of elements cause the same issue.

This is almost certainly a bug in the driver, but I am wondering if anyone has a workaround that can be done at the OSG level.

Thanks

You can use mesa instead when running under RDC.

http://www.mesa3d.org, works well and even supports shaders.

If you can create an install specifically for RDC users then you can just put the mesa version of opengl32.dll in with your app and you are done.

If you need to dynamically chose between mesa/hardware renderer, you'll need to do some monkeying about though,
either loading osg/opengl via LoadLibrary or you'll have to create a little launcher program to modify the current PATH so
the mesa dlls are/are not found as appropriate.

BTW, don't try and delay load opengl32. I tried that when I wanted to dynamically chose the open gl version and it causes odd problems.

--
http://www.ssTk.co.uk

Andrew Cunningham

unread,
May 31, 2012, 3:58:14 PM5/31/12
to osg-...@lists.openscenegraph.org
Ok, thanks for that idea. I will definitely look into using Mesa.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=47985#47985

Sergey Polischuk

unread,
Jun 1, 2012, 2:51:05 AM6/1/12
to OpenSceneGraph Users
iirc osg can statically link with opengl lib, so you can make 2 binaries: one with mesa statically linked in, and other using whatever opengl32.dll system have.
 
Cheers.
 
31.05.2012, 23:04, "Simon Hammett" <s.d.h...@googlemail.com>:

_______________________________________________

Andrew Cunningham

unread,
Jun 1, 2012, 5:41:18 PM6/1/12
to osg-...@lists.openscenegraph.org
I have had success with using Mesa.

The last Mesa version that apparently supports Windows GDI is 7.8. Later versions will build on Windows ,but crash at runtime.

I was able to successfully build Mesa 7.8.2 using Visual Studio 2010.
I ended up with a mesa based opengl32.dll that is "drop-in" replacement for the ancient MS supplied "opengl32.dll" and works fine for my needs .

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=48000#48000
Reply all
Reply to author
Forward
0 new messages