[osg-users] OpenSceneGraph using ANGLE on Windows
We have been developing a cross-platform tablet app using Qt Quick integrated with OpenSceneGraph in a similar way to that described here: http://qt-project.org/forums/viewthread/31277 Qt 5 is available set up to use both desktop OpenGL and Google's ANGLE wrapper for Direct3D ( https://code.google.com/p/angleproject/ ), so I was interested to see if I could make OSG, and osgEarth, work in this environment, since I had seen ANGLE mentioned several times on this mailing list, but no evidence of any development with it. Qt official advice recommends ANGLE for the following situations: * You need OpenGL ES features, but not full OpenGL * You have a heterogeneous user base with different Windows versions graphics cards * You do not want your user to have to install a recent graphics card driver * Your application needs to run over Windows Remote Desktop Protocol And in addition, it forms a step towards getting OSG going on Windows RT 8.1 and Windows Phone 8.1. I am pleased to report that I have both packages working with ANGLE now to my satisfaction, and have had it running for a few weeks now, with shaders and other rendering code identical between desktop Windows, iOS and Android. I outline here the steps I had to take so that others may follow my example, or that the build system issues I faced might be sorted out. I started my most recent build with the following: * OSG developer release 3.3.2 * osgEarth trunk (08/07/2014) * Visual Studio 2013 Pro update 2 * OSG prebuilt dependencies for VS2013 * Qt Enterprise 5.3.1 for VS2013 32-bit, without Desktop OpenGL (I see no reason why this shouldn't work as well with Qt Open Source) * Sqlite and geos, built from source with VS2013 for osgEarth The process I followed was as follows * Using CMake Gui, Configure osg for OpenGL ES 2.0 (as per here http://trac.openscenegraph.org/projects/osg/wiki/Community/OpenGL-ES ) * Set the opengl library to be libgles2 (release) and libgles2d (debug) * Set use Qt to OFF * Create visual studio project Then in Visual Studio * Remove GraphicsWindowWin32 and PixelBufferWin32 cpp files from the osgViewer project * Add to the Include Directories in the VC++ Directories section of all the project properties qtdir\ include\QtANGLE * Add to the Libraries Directories qtdir\lib (group-selecting all the projects in Solution Explorer makes that easier) * Edit the osg::getGLExtensionFuncPtr function to load libgles2d.dll for debug builds * Build the solution OsgEarth requires similar changes - set the name of the opengl es library appropriately in CMake, and add the include and library paths in Visual Studio. It was then possible to integrate osg with QT Quick's ANGLE-based OpenGL ES 2.0 contexts by overriding the background-drawing code of QQuickView using osgViewer::GraphicsWindowEmbedded. The principal remaining issue is that neither the osgviewer executable nor any of the examples will run, since there is no code to set up windows for them - that would require integration of ANGLE's version of EGL in place of the deleted GraphicsWindowWin32 etc. Also, this build process is not compatible with osgQt, but it should be able to be made compatible, since the old QGLWidget code should still work via ANGLE if it is made to use OpenGL ES 2.0 calls. I did not need any of that though, so I have not investigated further. Hopefully this information will be useful for anyone else who wants to use ANGLE on Windows with OpenSceneGraph, and it would be great if somebody who is sufficiently expert with CMake could fix the setup issues so that there was less hacking of the generated Visual Studio projects required. Alistair Baxter Software Engineer Have you upgraded FieldMove Clino to FieldMove Clino Pro? In-app purchase from these app stores: [cid:image001.png@01CF9C3D.20554130]https://itunes.apple.com/us/app/fieldmove-clino/id647463813?mt=8 [cid:image002.png@01CF9C3D.20554130] https://play.google.com/store/apps/details?id=com.mve.fieldmove.clino Midland Valley Exploration Ltd. 2 West Regent Street Glasgow G2 1RW United Kingdom Tel: +44 (0) 141 332 2681 Fax:+44 (0) 141 332 6792 The structural geology experts ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgOcean] Error linking osgOcean
Hi, I'm trying to compile osgOcean lib and examples under windows with mingw32. The library compile fine but I have a link fail for exe example. The error is the next: Linking CXX executable ../../bin/oceanExample.exe CMakeFiles/oceanExample.dir/objects.a(Scene.cpp.obj):Scene.cpp:(.text+0xb34): undefined reference to `osgOcean::Cylinder::setColor(osg::Vec4f const)' CMakeFiles/oceanExample.dir/objects.a(Scene.cpp.obj):Scene.cpp:(.text$_ZN8osgOcean10OceanScene16setUnderwaterFogEfRKN3osg5Vec4fE[__ZN8osgOcean10OceanScene16setUnderwaterFogEfRKN3osg5Vec4fE]+0x4a): undefined reference to `osgOcean::Cylinder::setColor(osg::Vec4f const)' c:/msys/1.0/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bin/ld.exe: CMakeFiles/oceanExample.dir/objects.a(Scene.cpp.obj): bad reloc address 0x4a in section `.text$_ZN8osgOcean10OceanScene16setUnderwaterFogEfRKN3osg5Vec4fE[__ZN8osgOcean10OceanScene16setUnderwaterFogEfRKN3osg5Vec4fE]' collect2.exe: error: ld returned 1 exit status make[2]: *** [bin/oceanExample.exe] Error 1 make[1]: *** [src/oceanExample/CMakeFiles/oceanExample.dir/all] Error 2 make: *** [all] Error 2 I've tried various CMake mod without success, I have enabled the DYNAMIC base option also without success. Any ideas? Thank you! Cheers, Dario -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60239#60239 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] Error linking osgOcean
See patches in my repo: https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-osgocean-svn Regards, Alexey. 10 июля 2014 г., в 19:08, Dario Minieri para...@cheapnet.it написал(а): Hi, I'm trying to compile osgOcean lib and examples under windows with mingw32. The library compile fine but I have a link fail for exe example. The error is the next: Linking CXX executable ../../bin/oceanExample.exe CMakeFiles/oceanExample.dir/objects.a(Scene.cpp.obj):Scene.cpp:(.text+0xb34): undefined reference to `osgOcean::Cylinder::setColor(osg::Vec4f const)' CMakeFiles/oceanExample.dir/objects.a(Scene.cpp.obj):Scene.cpp:(.text$_ZN8osgOcean10OceanScene16setUnderwaterFogEfRKN3osg5Vec4fE[__ZN8osgOcean10OceanScene16setUnderwaterFogEfRKN3osg5Vec4fE]+0x4a): undefined reference to `osgOcean::Cylinder::setColor(osg::Vec4f const)' c:/msys/1.0/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bin/ld.exe: CMakeFiles/oceanExample.dir/objects.a(Scene.cpp.obj): bad reloc address 0x4a in section `.text$_ZN8osgOcean10OceanScene16setUnderwaterFogEfRKN3osg5Vec4fE[__ZN8osgOcean10OceanScene16setUnderwaterFogEfRKN3osg5Vec4fE]' collect2.exe: error: ld returned 1 exit status make[2]: *** [bin/oceanExample.exe] Error 1 make[1]: *** [src/oceanExample/CMakeFiles/oceanExample.dir/all] Error 2 make: *** [all] Error 2 I've tried various CMake mod without success, I have enabled the DYNAMIC base option also without success. Any ideas? Thank you! Cheers, Dario -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60239#60239 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Multiple shared contexts VBO
Hi, I have on big VBO rendered in multiple windows and osg (v 3.0.1) creates new glBuffers for each, not shares them. I thought when two contexts are shared, I dont need to recreate VBO again. Its a feature ? What can I do about it ? Its posible to use osg with one context and multiple windows (same pixel format) ? Thank you! Cheers, Filip -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60240#60240 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenSceneGraph using ANGLE on Windows
Fascinating work, Alistair. We've done similar hacks on em,bedded devices with EGL where we created a context in EGL ourselves and used GraphicsWindowEmbedded (not with Qt necessarily though). On Thu, Jul 10, 2014 at 7:16 AM, Alistair Baxter alist...@mve.com wrote: We have been developing a cross-platform tablet app using Qt Quick integrated with OpenSceneGraph in a similar way to that described here: http://qt-project.org/forums/viewthread/31277 Qt 5 is available set up to use both desktop OpenGL and Google’s ANGLE wrapper for Direct3D ( https://code.google.com/p/angleproject/ ), so I was interested to see if I could make OSG, and osgEarth, work in this environment, since I had seen ANGLE mentioned several times on this mailing list, but no evidence of any development with it. Qt official advice recommends ANGLE for the following situations: · You need OpenGL ES features, but not full OpenGL · You have a heterogeneous user base with different Windows versions graphics cards · You do not want your user to have to install a recent graphics card driver · Your application needs to run over Windows Remote Desktop Protocol And in addition, it forms a step towards getting OSG going on Windows RT 8.1 and Windows Phone 8.1. I am pleased to report that I have both packages working with ANGLE now to my satisfaction, and have had it running for a few weeks now, with shaders and other rendering code identical between desktop Windows, iOS and Android. I outline here the steps I had to take so that others may follow my example, or that the build system issues I faced might be sorted out. I started my most recent build with the following: · OSG developer release 3.3.2 · osgEarth trunk (08/07/2014) · Visual Studio 2013 Pro update 2 · OSG prebuilt dependencies for VS2013 · Qt Enterprise 5.3.1 for VS2013 32-bit, *without* Desktop OpenGL (I see no reason why this shouldn’t work as well with Qt Open Source) · Sqlite and geos, built from source with VS2013 for osgEarth The process I followed was as follows · Using CMake Gui, Configure osg for OpenGL ES 2.0 (as per here http://trac.openscenegraph.org/projects/osg/wiki/Community/OpenGL-ES ) · Set the opengl library to be libgles2 (release) and libgles2d (debug) · Set use Qt to OFF · Create visual studio project Then in Visual Studio · Remove GraphicsWindowWin32 and PixelBufferWin32 cpp files from the osgViewer project · Add to the Include Directories in the VC++ Directories section of all the project properties qtdir\ include\QtANGLE · Add to the Libraries Directories qtdir\lib (group-selecting all the projects in Solution Explorer makes that easier) · Edit the osg::getGLExtensionFuncPtr function to load libgles2d.dll for debug builds · Build the solution OsgEarth requires similar changes – set the name of the opengl es library appropriately in CMake, and add the include and library paths in Visual Studio. It was then possible to integrate osg with QT Quick’s ANGLE-based OpenGL ES 2.0 contexts by overriding the background-drawing code of QQuickView using osgViewer::GraphicsWindowEmbedded. The principal remaining issue is that neither the osgviewer executable nor any of the examples will run, since there is no code to set up windows for them – that would require integration of ANGLE’s version of EGL in place of the deleted GraphicsWindowWin32 etc. Also, this build process is not compatible with osgQt, but it should be able to be made compatible, since the old QGLWidget code should still work via ANGLE if it is made to use OpenGL ES 2.0 calls. I did not need any of that though, so I have not investigated further. Hopefully this information will be useful for anyone else who wants to use ANGLE on Windows with OpenSceneGraph, and it would be great if somebody who is sufficiently expert with CMake could fix the setup issues so that there was less hacking of the generated Visual Studio projects required. Alistair Baxter Software Engineer Have you upgraded FieldMove Clino to FieldMove Clino Pro? In-app purchase from these app stores: https://itunes.apple.com/us/app/fieldmove-clino/id647463813?mt=8 https://play.google.com/store/apps/details?id=com.mve.fieldmove.clino Midland Valley Exploration Ltd. 2 West Regent Street Glasgow G2 1RW United Kingdom Tel: +44 (0) 141 332 2681 Fax:+44 (0) 141 332 6792 The structural geology experts ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Training • Consulting •
Re: [osg-users] Multiple shared contexts VBO
Ahoj Filip, yes, you can have shared context among viewers. Have a look at osg::GraphicsContext::Traits, there is a sharedContext member you can set. osgcompositeviewer example shows you how to set up a viewer from traits Nick On Thu, Jul 10, 2014 at 5:12 PM, Filip Arlet fili...@seznam.cz wrote: Hi, I have on big VBO rendered in multiple windows and osg (v 3.0.1) creates new glBuffers for each, not shares them. I thought when two contexts are shared, I dont need to recreate VBO again. Its a feature ? What can I do about it ? Its posible to use osg with one context and multiple windows (same pixel format) ? Thank you! Cheers, Filip -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60240#60240 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- trajce nikolov nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenSceneGraph using ANGLE on Windows
Hi Alistair, Great work,before we used a GLES Modified SDL+ANGLE to let OSG run in directx mode. zhuwan 07,11,2014 在2014-7-10 21:16:25,Alistair Baxter alist...@mve.com 写道: -原始邮件- 发件人: Alistair Baxter alist...@mve.com 发送时间: 2014-7-10 21:16:25 收件人: OpenSceneGraph Users osg-users@lists.openscenegraph.org 主题: [osg-users] OpenSceneGraph using ANGLE on Windows We have been developing a cross-platform tablet app using Qt Quick integrated with OpenSceneGraph in a similar way to that described here: http://qt-project.org/forums/viewthread/31277 Qt 5 is available set up to use both desktop OpenGL and Google’s ANGLE wrapper for Direct3D ( https://code.google.com/p/angleproject/ ), so I was interested to see if I could make OSG, and osgEarth, work in this environment, since I had seen ANGLE mentioned several times on this mailing list, but no evidence of any development with it. Qt official advice recommends ANGLE for the following situations: · You need OpenGL ES features, but not full OpenGL · You have a heterogeneous user base with different Windows versions graphics cards · You do not want your user to have to install a recent graphics card driver · Your application needs to run over Windows Remote Desktop Protocol And in addition, it forms a step towards getting OSG going on Windows RT 8.1 and Windows Phone 8.1. I am pleased to report that I have both packages working with ANGLE now to my satisfaction, and have had it running for a few weeks now, with shaders and other rendering code identical between desktop Windows, iOS and Android. I outline here the steps I had to take so that others may follow my example, or that the build system issues I faced might be sorted out. I started my most recent build with the following: · OSG developer release 3.3.2 · osgEarth trunk (08/07/2014) · Visual Studio 2013 Pro update 2 · OSG prebuilt dependencies for VS2013 · Qt Enterprise 5.3.1 for VS2013 32-bit, without Desktop OpenGL (I see no reason why this shouldn’t work as well with Qt Open Source) · Sqlite and geos, built from source with VS2013 for osgEarth The process I followed was as follows · Using CMake Gui, Configure osg for OpenGL ES 2.0 (as per here http://trac.openscenegraph.org/projects/osg/wiki/Community/OpenGL-ES ) · Set the opengl library to be libgles2 (release) and libgles2d (debug) · Set use Qt to OFF · Create visual studio project Then in Visual Studio · Remove GraphicsWindowWin32 and PixelBufferWin32 cpp files from the osgViewer project · Add to the Include Directories in the VC++ Directories section of all the project properties qtdir\include\QtANGLE · Add to the Libraries Directories qtdir\lib (group-selecting all the projects in Solution Explorer makes that easier) · Edit the osg::getGLExtensionFuncPtr function to load libgles2d.dll for debug builds · Build the solution OsgEarth requires similar changes – set the name of the opengl es library appropriately in CMake, and add the include and library paths in Visual Studio. It was then possible to integrate osg with QT Quick’s ANGLE-based OpenGL ES 2.0 contexts by overriding the background-drawing code of QQuickView using osgViewer::GraphicsWindowEmbedded. The principal remaining issue is that neither the osgviewer executable nor any of the examples will run, since there is no code to set up windows for them – that would require integration of ANGLE’s version of EGL in place of the deleted GraphicsWindowWin32 etc. Also, this build process is not compatible with osgQt, but it should be able to be made compatible, since the old QGLWidget code should still work via ANGLE if it is made to use OpenGL ES 2.0 calls. I did not need any of that though, so I have not investigated further. Hopefully this information will be useful for anyone else who wants to use ANGLE on Windows with OpenSceneGraph, and it would be great if somebody who is sufficiently expert with CMake could fix the setup issues so that there was less hacking of the generated Visual Studio projects required. Alistair Baxter Software Engineer Have you upgraded FieldMove Clino to FieldMove Clino Pro? In-app purchase from these app stores: Midland Valley Exploration Ltd. 2 West Regent Street Glasgow G2 1RW United Kingdom Tel: +44 (0) 141 332 2681 Fax:+44 (0) 141 332 6792 The structural geology experts ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Multiple shared contexts VBO
Hi, I know that, but when I debug my app, render will call getOrCreateGLBufferObject() with new contextID without knowledge of sharing context and creates new VBO. Thank you! Cheers, Filip -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60246#60246 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org