Re: [osg-users] Possible bug with OpenSceneGraph for OpenGL ES 2

2013-09-11 Thread Robert Osfield
Hi Preet,

The enable/disable of GL_TEXTURE_2D is completely under your scene graphs
control, if you have done a:

stateset-setTextureMode(texturetunit,GL_TEXTURE_2D,
osg::StateAttribute::ON);

or a

   stateset-setTextureAttributeAndModes(textureunit, texture,
osg::StateAttribute::ON);

Then your scene graph is the culprit and you just need to remove this.


Robert.



On 10 September 2013 21:56, Preet prismatic.proj...@gmail.com wrote:

 Hi,

 I've noticed on two separate platforms (PowerVR SGX 540 Adreno 320) that
 OSG will put out a warning when textures are used:

  Warning: detected OpenGL error 'invalid enumerant' after applying GLMode
 0xde1

 GLMode ox0de1 is GL_TEXTURE_2D.

 In include/osg/State, when the applyModeOnTexUnit function is invoked,
 glEnabled(GL_TEXTURE_2D) and glDisable(GL_TEXTURE_2D) may be called. On
 some OpenGL ES 2 platforms, this will return GL_INVALID_ENUMERANT because
 GL_TEXTURE_2D is always enabled for OpenGL ES 2.

 A possible fix is to wrap the glEnable and glDisable calls with an #ifndef
 OSG_GLES2_AVAILABLE, but there might be a better place to address this.


 Preet

 ___
 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] Possible bug with OpenSceneGraph for OpenGL ES 2

2013-09-10 Thread Preet
Hi,

I've noticed on two separate platforms (PowerVR SGX 540 Adreno 320) that
OSG will put out a warning when textures are used:

 Warning: detected OpenGL error 'invalid enumerant' after applying GLMode
0xde1

GLMode ox0de1 is GL_TEXTURE_2D.

In include/osg/State, when the applyModeOnTexUnit function is invoked,
glEnabled(GL_TEXTURE_2D) and glDisable(GL_TEXTURE_2D) may be called. On
some OpenGL ES 2 platforms, this will return GL_INVALID_ENUMERANT because
GL_TEXTURE_2D is always enabled for OpenGL ES 2.

A possible fix is to wrap the glEnable and glDisable calls with an #ifndef
OSG_GLES2_AVAILABLE, but there might be a better place to address this.


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