Re: [osg-users] Qt OpenGL Warning opengl

2016-04-28 Thread Auke-Dirk Pietersma
Hi Robert,

Good to know that osg checks the capabilties them selves.
I tried the following snippet:

Code:

 _ctx = std::unique_ptr(new QOpenGLContext);

QSurfaceFormat format;
format.setMajorVersion(_majorId);
format.setMinorVersion(_minorId);
format.setOption(QSurfaceFormat::DeprecatedFunctions,true);
format.setProfile(QSurfaceFormat::CoreProfile);


format.setDepthBufferSize(24);

_ctx->setFormat(format);
_active = _ctx->create();




and tested it with all profiles [CompatibilityProfile,CoreProfile,NoProfile] .

When i do make a 2.1 context i see no error messages, this would be weird 
right? Knowing that osg handles the capabilites them selves.

Osg was build with all OSG_GL[1,2,3]_AVAILABLE flag

Might there be something that iḿ overlooking? 
 
... 

Thank you!

Cheers,
Auke-Dirk

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





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


Re: [osg-users] Qt OpenGL Warning opengl

2016-04-27 Thread Robert Osfield
HI Auke-Dirke,

On 25 April 2016 at 14:07, Auke-Dirk Pietersma  wrote:

> I have the following issue. Whenever i choose to render a scene with
> opengl greater than 2.1 i get the following messages.
>
> Warning: detected OpenGL error 'invalid enumerant' after applying GLMode
> 0xb50
> Warning: detected OpenGL error 'invalid enumerant' after applying GLMode
> 0x4000
> Warning: detected OpenGL error 'invalid operation' after applying
> attribute LightModel
>
> Not only do i obtain these messages, the scene also does not get rendered.
>
> Nothing fancy has been done, see this init snippet:
>
>  graphicsWindow_ = new osgViewer::GraphicsWindowEmbedded( this->x(),
> this->y(),this->width(),this->height() );
> viewer_ = new osgViewer::Viewer;
>
> osg::Camera* camera = new osg::Camera;
> camera->setViewport( 0, 0, this->width(), this->height() );
> float aspectRatio = static_cast( this->width()) /
> static_cast( this->height() );
> camera->setClearColor( osg::Vec4( 0.f, 0.f, 1.f, 1.f ) );
> camera->setProjectionMatrixAsPerspective( 30.f, aspectRatio, 1.f,
> 1000.f );
> camera->setGraphicsContext( graphicsWindow_ );
> viewer_->setCamera(camera);
>
> _earthManip = new osgEarth::Util::EarthManipulator;
>
> viewer_->setCameraManipulator(_earthManip, false);
> viewer_->addEventHandler(new osgViewer::StatsHandler);
>
>
> osg::ref_ptr group = new osg::Group();
> _mapNode = createMapNode();
> group->addChild(_mapNode);
> _earthManip->setNode( _mapNode->getTerrainEngine() );
>
> viewer_->setSceneData(group.release());
>
> I'm Working on Linux with Qt5.6 on an ATI HAWAII , Radeon R9 Series.
>
> Can someone provide me with some hints/tips?
>

I presume you are using Qt to create the graphics context.  Is that you are
creating a context with a core profile with the compatibility profile
disabled?  The later is required for using the old fixed function pipeline
attributes and modes.

The OSG is able to use all GL3+GL4 features by testing for them at run-time
even if you just create a GL2.x graphics context so there little need for
explictly asking for GL3 core profile context.

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


[osg-users] Qt OpenGL Warning opengl

2016-04-26 Thread Auke-Dirk Pietersma
Hi All ,

I have the following issue. Whenever i choose to render a scene with opengl 
greater than 2.1 i get the following messages.

Warning: detected OpenGL error 'invalid enumerant' after applying GLMode 0xb50
Warning: detected OpenGL error 'invalid enumerant' after applying GLMode 0x4000
Warning: detected OpenGL error 'invalid operation' after applying attribute 
LightModel 

Not only do i obtain these messages, the scene also does not get rendered.

Nothing fancy has been done, see this init snippet:

 graphicsWindow_ = new osgViewer::GraphicsWindowEmbedded( this->x(), 
this->y(),this->width(),this->height() );
viewer_ = new osgViewer::Viewer;

osg::Camera* camera = new osg::Camera;
camera->setViewport( 0, 0, this->width(), this->height() );
float aspectRatio = static_cast( this->width()) / 
static_cast( this->height() );
camera->setClearColor( osg::Vec4( 0.f, 0.f, 1.f, 1.f ) );
camera->setProjectionMatrixAsPerspective( 30.f, aspectRatio, 1.f, 1000.f );
camera->setGraphicsContext( graphicsWindow_ );
viewer_->setCamera(camera);

_earthManip = new osgEarth::Util::EarthManipulator;

viewer_->setCameraManipulator(_earthManip, false);
viewer_->addEventHandler(new osgViewer::StatsHandler);


osg::ref_ptr group = new osg::Group();
_mapNode = createMapNode();
group->addChild(_mapNode);
_earthManip->setNode( _mapNode->getTerrainEngine() );

viewer_->setSceneData(group.release());

I'm Working on Linux with Qt5.6 on an ATI HAWAII , Radeon R9 Series.

Can someone provide me with some hints/tips?

Regards Auke-Dirk
... 

Thank you!

Cheers,
Auke-Dirk

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





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