From 21acda68981aa587a0b656269cf057eb250f7c59 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 7 Apr 2014 13:48:11 +0000 Subject: [PATCH] From Paul Martz, "We discussed the issue of GL_RED_SNORM and GL_RG_SNORM some time ago, but the issue was never completely resolved. Please see the attached submission to fix the issue. osg/GL2Extensions was incorrectly defining GL_RED_SNORM and GL_RG_SNORM as part of the definitions for OpenGL v3.1. However, a quick review of the 3.1 spec indicates that these are not part of the 3.1 standard. My attached change moves these definitions out of the #ifndef GL_VERSION_3_1 conditional block, and defines them conditionally if not already defined. This allows the DDS plugin to build for GL3. " --- include/osg/GL2Extensions | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/include/osg/GL2Extensions b/include/osg/GL2Extensions index 0c4a1a699..5ed890fb6 100644 --- a/include/osg/GL2Extensions +++ b/include/osg/GL2Extensions @@ -385,8 +385,6 @@ typedef char GLchar; #define GL_TEXTURE_BINDING_RECTANGLE 0x84F6 #define GL_PROXY_TEXTURE_RECTANGLE 0x84F7 #define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8 -#define GL_RED_SNORM 0x8F90 -#define GL_RG_SNORM 0x8F91 #define GL_RGB_SNORM 0x8F92 #define GL_RGBA_SNORM 0x8F93 #define GL_R8_SNORM 0x8F94 @@ -402,6 +400,14 @@ typedef char GLchar; #define GL_PRIMITIVE_RESTART_INDEX 0x8F9E #endif +#ifndef GL_RED_SNORM +#define GL_RED_SNORM 0x8F90 +#endif +#ifndef GL_RG_SNORM +#define GL_RG_SNORM 0x8F91 +#endif + + #ifndef GL_VERSION_4_0 #define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C #define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D