Hi Robert,

while it would be better to send a fix, but I would rather report it here,
because unsure what is best solution ( the code in discussion is both
relevant to dev version and latest stable version )

in osg/State header file there is a function

inline bool applyModeOnTexUnit(unsigned int
unit,StateAttribute::GLMode mode,bool enabled,ModeStack& ms)

which applies texture mode for texture, say for Texture2D after getting

virtual GLenum getTextureTarget() const { return GL_TEXTURE_2D; }

it sets

glEnable(GL_TEXTURE_2D)

the problem is, that for OpenGL ES 2.0 enabling  GL_TEXTURE_2D is a mistake.
And while some drivers might be permissive, my test with ANGLE on windows
provides a clear error message if glEnabled is called.

currently I just omit enabling mode #if defined(OSG_GLES2_AVAILABLE)
but maybe a better solution exists.

Regards
Sergey
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to