From Thomas Hogarth, "Attached is a small build fix for PointSprite when compiling under GLES2 (r13788)

GL_POINT_SPRITE_OES does not exist in GLES2, instead you just draw using GL_POINTS then use gl_PointSize in a vertex shader to set the size."
This commit is contained in:
Robert Osfield
2013-10-01 09:05:42 +00:00
parent d30a94bf4c
commit 04ea3aa6a2

View File

@@ -45,7 +45,7 @@ bool PointSprite::checkValidityOfAssociatedModes(osg::State& state) const
bool modeValid = isPointSpriteSupported(state.getContextID());
#if defined( OSG_GLES1_AVAILABLE ) || defined( OSG_GLES2_AVAILABLE )
#if defined( OSG_GLES1_AVAILABLE ) //point sprites don't exist on es 2.0
state.setModeValidity(GL_POINT_SPRITE_OES, modeValid);
#else
state.setModeValidity(GL_POINT_SPRITE_ARB, modeValid);
@@ -61,7 +61,7 @@ void PointSprite::apply(osg::State& state) const
const Point::Extensions* extensions = Point::getExtensions(state.getContextID(),true);
extensions->glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN,_coordOriginMode);
#elif defined( OSG_GLES1_AVAILABLE ) || defined( OSG_GLES2_AVAILABLE )
#elif defined( OSG_GLES1_AVAILABLE ) //point sprites don't exist on es 2.0
if(!isPointSpriteSupported(state.getContextID())) return;