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

Werner.Modenbach at texion.eu Werner.Modenbach at texion.eu
Fri Sep 9 09:55:41 PDT 2016


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 <daniel.rd at hotmail.de> 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 run
>my 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 view
>
>
>Code:
>
>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 against 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
>with
>software rendering only, before switching to Remote Desktop.
>
>
>I suspect that the mixture of the opengl32.dll versions leads to crash
>the application or maybe
>even somethings is wrong with the opengl32sw.dll from Qt. But
>everything non-related to osg seems
>to be displayed fine. I am using osg 3.4.0 and Qt 5.7
>
>
>So 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
>
>
>
>
>
>_______________________________________________
>osg-users mailing list
>osg-users at lists.openscenegraph.org
>http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20160909/b2b78313/attachment-0002.htm>


More information about the osg-users mailing list