[osg-users] How to prevent OSG linking against Desktop OpenGL

Daniel Neos daniel.rd at hotmail.de
Fri Sep 9 10:19:30 PDT 2016


Hi wernerM,

Unfortunalety something like TeamViewer is not an option for me.
I have to it the hard way(via windows rdp)...



wernerM wrote:
> Hi Daniel,
> We are also using OSG together with modeen shaders like geometry shaders. We have to do a lot of online presentations and online support. This works perfect with TeamViewer. May this be an option for you? 
> 
> On 9. September 2016 18:04:13 MESZ, Daniel Neos <> wrote:
> >  
> > > Hi,my Applcation mainly uses Qt(with QOpenGlWidget) and OpensceneGraph, thus it relies heavily on OpenGL.Since the Remote Desktop Protocol(RDP) poorly supports OpenGL, there is no trivial way to runmy application over Windows Remote Desktop. Hence, I choose to use Softwarerendering as a fallback.I can tell Qt which opengl version to use programmatically with QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL, true);or QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL, true);But osg seems to strictly link against opengl.dll from the desktop version, no matter if i am delay loading the osg*.dll i am using or not.When delay loading the osg*.dll , the desktop version will be loaded when the application makes it first contact with osg-related stuff, in my case it is an objects which inherits from QOpenGLWidget integrating the openscenegraph viewCode:<
> > > br
> > > />OSGWidget::OSGWidget(QWidget* parent, Qt::WindowFlags f)    : QOpenGLWidget(parent, f)    , m_graphicsWindow(new osgViewer::GraphicsWindowEmbedded(x(),        y(),        width(),        height()))    , m_geometry(new osg::Geometry())    , m_isInitialized(false)    , m_compositeViewer(new osgViewer::CompositeViewer)    , m_camera(new osg::Camera)    , m_view(new OsgView)    , m_geometryNode(new osg::Geode)    , m_pickEventHandler(new PickEventHandler(static_cast<OSGWidget&>(*this)))    , m_camManipulator(new OsgCameraManipulator)    , m_depthData(nullptr)    , m_markedPoint(QPoint(DepthDataSet::InvalidPixelCoordinateValue, DepthDataSet::InvalidPixelCoordinateValue))    , m_isMarkedPointVisible(false)    , m_isRendering(false){}Everything works fine using the desktop version of openg. But If I am trying to link agains
> > > t the
> > > opengl32sw.dll(from Qt), osg seems to ignore it and links the desktopOpenGL.The leads to the problem that the application crashes in the deep of osg.To be more specific, here is an excerpt of the callstack from top to bottom.->OSGWidget::paintGL() ->m_compositeViewer->renderingTraversals()  -> ViewerBase::makeCurrent()   -> osg::GraphicsContext::makeCurrent()     -> osg::State::initializeExtensionProcs()Here I need to say that my first step is trying to run the application withsoftware rendering only, before switching to Remote Desktop.I suspect that the mixture of the opengl32.dll versions leads to crash the application or maybeeven somethings is wrong with the opengl32sw.dll from Qt. But everything non-related to osg seemsto be displayed fine. I am using osg 3.4.0 and Qt 5.7So how can I run osg Code based on Software rendering
> > > ?Thank you!Cheers,Daniel[/b][/code]------------------Read this topic online here:http://forum.openscenegraph.org/viewtopic.php?p=68563#68563 (http://forum.openscenegraph.org/viewtopic.php?p=68563#68563)osg-users mailing ://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org)
> > 
> 
> 
>  ------------------
> Post generated by Mail2Forum


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








More information about the osg-users mailing list