[osg-users] [osgPlugins] osgDB::readImageFile() chooses ffmpeg over libpng

2015-05-10 Thread Paul
OSG-3.3.7

both plugins osgdb_png and osgdb_ffmpeg loaded.
osgDB::readImageFile(image.png) chooses ffmpeg over libpng to load .png image 
files. 

I checked ReaderWriterFFmpeg.cpp, and it does not add the .png extention.

How do I give libpng priority on .png files. Thanks :)

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





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


Re: [osg-users] Forcing a scene to rebind textures

2015-05-10 Thread Philippe Renon
Hi Robert,

As a matter of fact I have a GraphicsContext managed by osg.
And it properly gets destroyed.

I later create a new View and set on it the scene data that was previously set 
on the other view (which is now discarded).
I then see the errors below and get crashes. 
Please note that this does not happen on simple scenes but on scenes containing 
osgearth maps.

There is something I am not doing properly when destorying the 1s view which 
leaves the scene in a bad state. Question is to find what is wrong with the 
scene.


robertosfield wrote:
 Hi Phillipe.
 
 When a graphics context is detroyed a releaseGLObjects() on the scene
 graph should be called.  When a context is destroyed outwith the
 control of the core OSG then calling
 osg::discardAllGLObjects(contextID) should be done to make sure any
 cached GL objects handles and discarded for that context.
 
 The osgViewer library tries to do this all for you, but if you've
 implement your own context setup/destruction then it won't have all
 the control to do this automatically.
 
 Robert.
 
 On 10 May 2015 at 13:12, philippe renon  wrote:
 
  Hi,
  
  I am using osg 3.2.1 in a Qt application. Sometimes, for reasons too long to
  explain here, Qt will destroy the OpenGL context used by a scene. After that
  I see rendering problems and logs has warnings similar to this one:
  
  DBG: [OSG NOTICE]
  WRN: [OSG WARN] Warning: detected OpenGL error 'invalid enumerant' at After
  Renderer::compile
  WRN: [OSG WARN]
  
  The rendering issues are caused by missing textures. The geometry looks fine
  though.
  
  Is there a way to force a complete scene to rebind its textures or do I need
  to destroy and rebuild the scene?
  
  Philippe.
  
  ___
  osg-users mailing list
  
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
  
 ___
 osg-users mailing list
 
 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=63687#63687





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


[osg-users] Forcing a scene to rebind textures

2015-05-10 Thread philippe renon
Hi,
I am using osg 3.2.1 in a Qt application. Sometimes, for reasons too long to 
explain here, Qt will destroy the OpenGL context used by a scene. After that I 
see rendering problems and logs has warnings similar to this one:
DBG: [OSG NOTICE]
WRN: [OSG WARN] Warning: detected OpenGL error 'invalid enumerant' at After 
Renderer::compile
WRN: [OSG WARN]

The rendering issues are caused by missing textures. The geometry looks fine 
though.
Is there a way to force a complete scene to rebind its textures or do I need to 
destroy and rebuild the scene?
Philippe.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Forcing a scene to rebind textures

2015-05-10 Thread Robert Osfield
Hi Phillipe.

When a graphics context is detroyed a releaseGLObjects() on the scene
graph should be called.  When a context is destroyed outwith the
control of the core OSG then calling
osg::discardAllGLObjects(contextID) should be done to make sure any
cached GL objects handles and discarded for that context.

The osgViewer library tries to do this all for you, but if you've
implement your own context setup/destruction then it won't have all
the control to do this automatically.

Robert.

On 10 May 2015 at 13:12, philippe renon philippe_re...@yahoo.fr wrote:
 Hi,

 I am using osg 3.2.1 in a Qt application. Sometimes, for reasons too long to
 explain here, Qt will destroy the OpenGL context used by a scene. After that
 I see rendering problems and logs has warnings similar to this one:

 DBG: [OSG NOTICE]
 WRN: [OSG WARN] Warning: detected OpenGL error 'invalid enumerant' at After
 Renderer::compile
 WRN: [OSG WARN]

 The rendering issues are caused by missing textures. The geometry looks fine
 though.

 Is there a way to force a complete scene to rebind its textures or do I need
 to destroy and rebuild the scene?

 Philippe.

 ___
 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