diff --git a/include/osg/GLDefines b/include/osg/GLDefines index bebce6656..6b4e00ed6 100644 --- a/include/osg/GLDefines +++ b/include/osg/GLDefines @@ -628,16 +628,16 @@ typedef char GLchar; #define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull #endif -#ifndef GL_TEXTURE_2D_ARRAY_EXT - #define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A - #define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A - #define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B - #define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D - #define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF - #define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E - #define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1 - #define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4 - #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4 +#ifndef GL_TEXTURE_2D_ARRAY + #define GL_TEXTURE_2D_ARRAY 0x8C1A + #define GL_TEXTURE_2D_ARRAY 0x8C1A + #define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B + #define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D + #define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF + #define GL_COMPARE_REF_DEPTH_TO_TEXTURE 0x884E + #define GL_SAMPLER_2D_ARRAY 0x8DC1 + #define GL_SAMPLER_2D_ARRAY_SHADO 0x8DC4 + #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 #endif #ifndef GL_MAX_3D_TEXTURE_SIZE diff --git a/include/osg/TexGen b/include/osg/TexGen index ed153d6f6..3d265fe5b 100644 --- a/include/osg/TexGen +++ b/include/osg/TexGen @@ -27,12 +27,12 @@ #define GL_TEXTURE_GEN_Q 0x0C63 #endif -#ifndef GL_NORMAL_MAP_ARB - #define GL_NORMAL_MAP_ARB 0x8511 +#ifndef GL_NORMAL_MAP + #define GL_NORMAL_MAP 0x8511 #endif -#ifndef GL_REFLECTION_MAP_ARB - #define GL_REFLECTION_MAP_ARB 0x8512 +#ifndef GL_REFLECTION_MAP + #define GL_REFLECTION_MAP 0x8512 #endif namespace osg { @@ -101,8 +101,8 @@ class OSG_EXPORT TexGen : public StateAttribute OBJECT_LINEAR = GL_OBJECT_LINEAR, EYE_LINEAR = GL_EYE_LINEAR, SPHERE_MAP = GL_SPHERE_MAP, - NORMAL_MAP = GL_NORMAL_MAP_ARB, - REFLECTION_MAP = GL_REFLECTION_MAP_ARB + NORMAL_MAP = GL_NORMAL_MAP, + REFLECTION_MAP = GL_REFLECTION_MAP }; inline void setMode( Mode mode ) { _mode = mode; } diff --git a/include/osg/Texture2DArray b/include/osg/Texture2DArray index e410cd8f1..a8df77c7a 100644 --- a/include/osg/Texture2DArray +++ b/include/osg/Texture2DArray @@ -40,7 +40,7 @@ class OSG_EXPORT Texture2DArray : public Texture /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ virtual int compare(const StateAttribute& rhs) const; - virtual GLenum getTextureTarget() const { return GL_TEXTURE_2D_ARRAY_EXT; } + virtual GLenum getTextureTarget() const { return GL_TEXTURE_2D_ARRAY; } /** Texture2DArray is related to non fixed pipeline usage only so isn't appropriate to enable/disable.*/ virtual bool getModeUsage(StateAttribute::ModeUsage&) const { return false; } diff --git a/src/osg/GLExtensions.cpp b/src/osg/GLExtensions.cpp index 588208a6a..c9efa544b 100644 --- a/src/osg/GLExtensions.cpp +++ b/src/osg/GLExtensions.cpp @@ -928,7 +928,7 @@ GLExtensions::GLExtensions(unsigned int in_contextID): max2DSize = 0; if (validContext) glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max2DSize); maxLayerCount = 0; - if (validContext) glGetIntegerv(GL_MAX_ARRAY_TEXTURE_LAYERS_EXT, &maxLayerCount); + if (validContext) glGetIntegerv(GL_MAX_ARRAY_TEXTURE_LAYERS, &maxLayerCount); // Bindless textures setGLExtensionFuncPtr(glGetTextureHandle, "glGetTextureHandle", "glGetTextureHandleARB","glGetTextureHandleNV", validContext); diff --git a/src/osg/Image.cpp b/src/osg/Image.cpp index 1149acdc4..74fbc9dae 100644 --- a/src/osg/Image.cpp +++ b/src/osg/Image.cpp @@ -1076,10 +1076,10 @@ void Image::readImageFromCurrentTexture(unsigned int contextID, bool copyMipMaps if (extensions->isTexture2DArraySupported) { - glGetBooleanv(GL_TEXTURE_BINDING_2D_ARRAY_EXT, &binding2DArray); + glGetBooleanv(GL_TEXTURE_BINDING_2D_ARRAY, &binding2DArray); } - GLenum textureMode = binding1D ? GL_TEXTURE_1D : binding2D ? GL_TEXTURE_2D : bindingRect ? GL_TEXTURE_RECTANGLE : binding3D ? GL_TEXTURE_3D : binding2DArray ? GL_TEXTURE_2D_ARRAY_EXT : 0; + GLenum textureMode = binding1D ? GL_TEXTURE_1D : binding2D ? GL_TEXTURE_2D : bindingRect ? GL_TEXTURE_RECTANGLE : binding3D ? GL_TEXTURE_3D : binding2DArray ? GL_TEXTURE_2D_ARRAY : 0; if (bindingCubeMap) { switch (face) @@ -1150,7 +1150,7 @@ void Image::readImageFromCurrentTexture(unsigned int contextID, bool copyMipMaps glGetTexLevelParameteriv(textureMode, 0, GL_TEXTURE_COMPRESSED_ARB,&compressed); } } - else if (textureMode==GL_TEXTURE_2D_ARRAY_EXT) + else if (textureMode==GL_TEXTURE_2D_ARRAY) { if (extensions->isCompressedTexImage3DSupported()) { diff --git a/src/osg/StateSet.cpp b/src/osg/StateSet.cpp index f179be023..47883ddcf 100644 --- a/src/osg/StateSet.cpp +++ b/src/osg/StateSet.cpp @@ -150,8 +150,8 @@ class TextureGLModeSet _textureModeSet.insert(GL_TEXTURE_BUFFER); _textureModeSet.insert(GL_TEXTURE_CUBE_MAP); - _textureModeSet.insert(GL_TEXTURE_RECTANGLE_NV); - _textureModeSet.insert(GL_TEXTURE_2D_ARRAY_EXT); + _textureModeSet.insert(GL_TEXTURE_RECTANGLE); + _textureModeSet.insert(GL_TEXTURE_2D_ARRAY); _textureModeSet.insert(GL_TEXTURE_2D_MULTISAMPLE); _textureModeSet.insert(GL_TEXTURE_GEN_Q); @@ -1517,7 +1517,7 @@ const StateSet::RefAttributePair* StateSet::getTextureAttributePair(unsigned int bool StateSet::checkValidityOfAssociatedModes(osg::State& state) const { - OSG_NOTICE<<__PRETTY_FUNCTION__<