diff --git a/include/osg/GLDefines b/include/osg/GLDefines index bebce6656..5a8f21958 100644 --- a/include/osg/GLDefines +++ b/include/osg/GLDefines @@ -690,10 +690,6 @@ namespace osg #endif #endif #endif - - #if defined(OSG_GLES1_FEATURES) || defined(OSG_GLES2_FEATURES)|| defined(OSG_GLES3_FEATURES) - typedef double GLclampd; - #endif } #endif diff --git a/include/osg/GLExtensions b/include/osg/GLExtensions index b15091839..deb691f29 100644 --- a/include/osg/GLExtensions +++ b/include/osg/GLExtensions @@ -557,7 +557,7 @@ class OSG_EXPORT GLExtensions : public osg::Referenced bool isSGIXMinMaxSupported; bool isLogicOpSupported; - void (GL_APIENTRY * glBlendColor) (GLclampf red , GLclampf green , GLclampf blue , GLclampf alpha); + void (GL_APIENTRY * glBlendColor) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); void (GL_APIENTRY * glBlendEquation)(GLenum mode); void (GL_APIENTRY * glBlendEquationSeparate)(GLenum modeRGB, GLenum modeAlpha); void (GL_APIENTRY * glBlendEquationi)(GLuint buf, GLenum mode); @@ -599,7 +599,7 @@ class OSG_EXPORT GLExtensions : public osg::Referenced bool isMultisampleSupported; bool isMultisampleFilterHintSupported; - void (GL_APIENTRY * glSampleCoverage) (GLclampf value, GLboolean invert); + void (GL_APIENTRY * glSampleCoverage) (GLfloat value, GLboolean invert); // Point @@ -725,8 +725,9 @@ class OSG_EXPORT GLExtensions : public osg::Referenced void (GL_APIENTRY * glScissorArrayv) (GLuint first, GLsizei count, const GLint * v); void (GL_APIENTRY * glScissorIndexed) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); void (GL_APIENTRY * glScissorIndexedv) (GLuint index, const GLint * v); - void (GL_APIENTRY * glDepthRangeArrayv) (GLuint first, GLsizei count, const GLclampd * v); - void (GL_APIENTRY * glDepthRangeIndexed) (GLuint index, GLclampd n, GLclampd f); + void (GL_APIENTRY * glDepthRangeArrayv) (GLuint first, GLsizei count, const GLdouble * v); + void (GL_APIENTRY * glDepthRangeIndexed) (GLuint index, GLdouble n, GLdouble f); + void (GL_APIENTRY * glDepthRangeIndexedf) (GLuint index, GLfloat n, GLfloat f); void (GL_APIENTRY * glGetFloati_v) (GLenum target, GLuint index, GLfloat *data); void (GL_APIENTRY * glGetDoublei_v) (GLenum target, GLuint index, GLdouble *data); diff --git a/src/osg/DepthRangeIndexed.cpp b/src/osg/DepthRangeIndexed.cpp index 5ae846931..9aaedb3cf 100644 --- a/src/osg/DepthRangeIndexed.cpp +++ b/src/osg/DepthRangeIndexed.cpp @@ -41,7 +41,11 @@ void DepthRangeIndexed::apply(State& state) const const GLExtensions* extensions = state.get(); if (extensions->glDepthRangeIndexed) { - extensions->glDepthRangeIndexed(static_cast(_index), static_cast(_zNear), static_cast(_zFar)); + extensions->glDepthRangeIndexed(static_cast(_index), static_cast(_zNear), static_cast(_zFar)); + } + else if (extensions->glDepthRangeIndexedf) + { + extensions->glDepthRangeIndexedf(static_cast(_index), static_cast(_zNear), static_cast(_zFar)); } else { diff --git a/src/osg/GLExtensions.cpp b/src/osg/GLExtensions.cpp index d89e63907..b5c2664d0 100644 --- a/src/osg/GLExtensions.cpp +++ b/src/osg/GLExtensions.cpp @@ -1171,6 +1171,7 @@ GLExtensions::GLExtensions(unsigned int in_contextID): osg::setGLExtensionFuncPtr(glScissorIndexedv, "glScissorIndexedv", validContext); osg::setGLExtensionFuncPtr(glDepthRangeArrayv, "glDepthRangeArrayv", validContext); osg::setGLExtensionFuncPtr(glDepthRangeIndexed, "glDepthRangeIndexed", validContext); + osg::setGLExtensionFuncPtr(glDepthRangeIndexedf, "glDepthRangeIndexedfOES", "glDepthRangeIndexedfNV", validContext); osg::setGLExtensionFuncPtr(glGetFloati_v, "glGetFloati_v", validContext); osg::setGLExtensionFuncPtr(glGetDoublei_v, "glGetDoublei_v", validContext); osg::setGLExtensionFuncPtr(glGetIntegerIndexedvEXT, "glGetIntegerIndexedvEXT", validContext);