From 04ea3aa6a29ee7be6fa947b44233214376d8167d Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 1 Oct 2013 09:05:42 +0000 Subject: [PATCH] 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." --- src/osg/PointSprite.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osg/PointSprite.cpp b/src/osg/PointSprite.cpp index 0bf9330bf..809ead418 100644 --- a/src/osg/PointSprite.cpp +++ b/src/osg/PointSprite.cpp @@ -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;