O.K. in any case, thank you for your time Paul.
@Community, I wonder if this behavior should be treated as bug and
should be reported. What else could be done to find the source of the
problem ?
Summary: My GL3 compiled osg version does not reach the code where a
forward compatible GL3 context gets created. What should be my next steps ?
Meanwhile I recompiled for GL3 following this article, and made sure QT
does not get build:
http://forum.openscenegraph.org/viewtopic.php?t=7322
Cheers, PP
You are on Windows, right? And I assume you built OSG for GL3 (changed
all the CMake setting from their default GL2 values)?
-Paul
On 10/11/2011 10:25 AM, PP CG wrote:
Hi Paul,
thanks, but unfortunately this does not help as the method
GraphicsWindowWin32::createContextImplementation() does not get
called at all, and the glContextVersion does not get parsed ( at my
site ). This brings me back to my doubts and original question,
probably I use the wrong way to create the GL3 context, so what is
the right way ?
I am sorry, I am getting lost in the osg code here. Have no idea what
to do to get this particular method called.
Thank you
Cheers, PP
Hi -- A simple search of the source code shows that glContextVersion
is parsed in only one place: GraphicsContextWin32.cpp, line 1678.
Set a breakpoint there in the debugger and step through the
following lines of code to ensure you're getting the right context.
-Paul
On 10/11/2011 1:32 AM, PP CG wrote:
Hello community,
I compiled osg for GL3, and created a glContextVersion( "3.3" ) GL
context. In my simple test application Camera Manipulation and
MatrixTransforms are working as usual without me writing any
transformation shader. Is this possible ?
As I have doubts about this I guess that I have setup the GL
context in a wrong way, so how does one set it up properly ?
My way:
osg::GraphicsContext::Traits * traits = new
osg::GraphicsContext::Traits() ;
int width = 1920 , height = 1200 ;
traits -> x = 0 ;
traits -> y = 0 ;
traits -> width = width ;
traits -> height = height ;
traits -> windowDecoration = true ;
traits -> doubleBuffer = true ;
traits -> glContextVersion = std::string( "3.3" ) ;
traits -> windowDecoration = false ;
osg::GraphicsContext * graphicsContext =
osg::GraphicsContext::createGraphicsContext( traits ) ;
osg::Camera * cam = new osg::Camera() ;
cam -> setGraphicsContext( graphicsContext ) ;
cam -> setViewport( 0 , 0 , width , height ) ;
cam -> setClearMask( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ) ;
cam -> setClearColor( osg::Vec4( 0.0 , 0.0 , 0.0 , 1.0 ) ) ;
cam -> setProjectionMatrixAsPerspective( 30.0f , ( float )width
/ ( float )height , 1.0 , 1000.0 ) ;
viewer.setCamera( cam ) ;
viewer.setSceneData( xform.get() ) ;
viewer.realize() ;
return viewer.run() ;
Thank you
Cheers, PP
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org