diff --git a/include/osg/Texture b/include/osg/Texture index a1fbce028..dd9c3032e 100644 --- a/include/osg/Texture +++ b/include/osg/Texture @@ -28,162 +28,170 @@ // If not defined by gl.h use the definition found in: // http://oss.sgi.com/projects/ogl-sample/registry/EXT/texture_filter_anisotropic.txt #ifndef GL_TEXTURE_MAX_ANISOTROPY_EXT -#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE + #define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE #endif #ifndef GL_ARB_texture_compression -#define GL_COMPRESSED_ALPHA_ARB 0x84E9 -#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA -#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB -#define GL_COMPRESSED_INTENSITY_ARB 0x84EC -#define GL_COMPRESSED_RGB_ARB 0x84ED -#define GL_COMPRESSED_RGBA_ARB 0x84EE -#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF -#define GL_TEXTURE_COMPRESSED_ARB 0x86A1 -#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2 -#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3 + #define GL_COMPRESSED_ALPHA_ARB 0x84E9 + #define GL_COMPRESSED_LUMINANCE_ARB 0x84EA + #define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB + #define GL_COMPRESSED_INTENSITY_ARB 0x84EC + #define GL_COMPRESSED_RGB_ARB 0x84ED + #define GL_COMPRESSED_RGBA_ARB 0x84EE + #define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF + #define GL_TEXTURE_COMPRESSED_ARB 0x86A1 + #define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2 + #define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3 #endif #ifndef GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB -#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0 + #define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0 #endif #ifndef GL_EXT_texture_compression_s3tc -#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 -#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 -#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 -#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 + #define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 + #define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 + #define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 + #define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 #endif #ifndef GL_ARB_INTERNAL_TEXTURE_FORMAT -#define GL_RGBA32F_ARB 0x8814 -#define GL_RGB32F_ARB 0x8815 -#define GL_ALPHA32F_ARB 0x8816 -#define GL_INTENSITY32F_ARB 0x8817 -#define GL_LUMINANCE32F_ARB 0x8818 -#define GL_LUMINANCE_ALPHA32F_ARB 0x8819 -#define GL_RGBA16F_ARB 0x881A -#define GL_RGB16F_ARB 0x881B -#define GL_ALPHA16F_ARB 0x881C -#define GL_INTENSITY16F_ARB 0x881D -#define GL_LUMINANCE16F_ARB 0x881E -#define GL_LUMINANCE_ALPHA16F_ARB 0x881F + #define GL_RGBA32F_ARB 0x8814 + #define GL_RGB32F_ARB 0x8815 + #define GL_ALPHA32F_ARB 0x8816 + #define GL_INTENSITY32F_ARB 0x8817 + #define GL_LUMINANCE32F_ARB 0x8818 + #define GL_LUMINANCE_ALPHA32F_ARB 0x8819 + #define GL_RGBA16F_ARB 0x881A + #define GL_RGB16F_ARB 0x881B + #define GL_ALPHA16F_ARB 0x881C + #define GL_INTENSITY16F_ARB 0x881D + #define GL_LUMINANCE16F_ARB 0x881E + #define GL_LUMINANCE_ALPHA16F_ARB 0x881F #endif #ifndef GL_ARB_PIXEL_DATA -#define GL_HALF_FLOAT_ARB 0x140B + #define GL_HALF_FLOAT_ARB 0x140B #endif #ifndef GL_NV_texture_shader -#define GL_HILO_NV 0x86F4 -#define GL_DSDT_NV 0x86F5 -#define GL_DSDT_MAG_NV 0x86F6 -#define GL_DSDT_MAG_VIB_NV 0x86F7 -#define GL_HILO16_NV 0x86F8 -#define GL_SIGNED_HILO_NV 0x86F9 -#define GL_SIGNED_HILO16_NV 0x86FA -#define GL_SIGNED_RGBA_NV 0x86FB -#define GL_SIGNED_RGBA8_NV 0x86FC -#define GL_SIGNED_RGB_NV 0x86FE -#define GL_SIGNED_RGB8_NV 0x86FF -#define GL_SIGNED_LUMINANCE_NV 0x8701 -#define GL_SIGNED_LUMINANCE8_NV 0x8702 -#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703 -#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704 -#define GL_SIGNED_ALPHA_NV 0x8705 -#define GL_SIGNED_ALPHA8_NV 0x8706 -#define GL_SIGNED_INTENSITY_NV 0x8707 -#define GL_SIGNED_INTENSITY8_NV 0x8708 -#define GL_DSDT8_NV 0x8709 -#define GL_DSDT8_MAG8_NV 0x870A -#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B -#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C -#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D + #define GL_HILO_NV 0x86F4 + #define GL_DSDT_NV 0x86F5 + #define GL_DSDT_MAG_NV 0x86F6 + #define GL_DSDT_MAG_VIB_NV 0x86F7 + #define GL_HILO16_NV 0x86F8 + #define GL_SIGNED_HILO_NV 0x86F9 + #define GL_SIGNED_HILO16_NV 0x86FA + #define GL_SIGNED_RGBA_NV 0x86FB + #define GL_SIGNED_RGBA8_NV 0x86FC + #define GL_SIGNED_RGB_NV 0x86FE + #define GL_SIGNED_RGB8_NV 0x86FF + #define GL_SIGNED_LUMINANCE_NV 0x8701 + #define GL_SIGNED_LUMINANCE8_NV 0x8702 + #define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703 + #define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704 + #define GL_SIGNED_ALPHA_NV 0x8705 + #define GL_SIGNED_ALPHA8_NV 0x8706 + #define GL_SIGNED_INTENSITY_NV 0x8707 + #define GL_SIGNED_INTENSITY8_NV 0x8708 + #define GL_DSDT8_NV 0x8709 + #define GL_DSDT8_MAG8_NV 0x870A + #define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B + #define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C + #define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D #endif #ifndef GL_NV_float_buffer -#define GL_FLOAT_R_NV 0x8880 -#define GL_FLOAT_RG_NV 0x8881 -#define GL_FLOAT_RGB_NV 0x8882 -#define GL_FLOAT_RGBA_NV 0x8883 -#define GL_FLOAT_R16_NV 0x8884 -#define GL_FLOAT_R32_NV 0x8885 -#define GL_FLOAT_RG16_NV 0x8886 -#define GL_FLOAT_RG32_NV 0x8887 -#define GL_FLOAT_RGB16_NV 0x8888 -#define GL_FLOAT_RGB32_NV 0x8889 -#define GL_FLOAT_RGBA16_NV 0x888A -#define GL_FLOAT_RGBA32_NV 0x888B + #define GL_FLOAT_R_NV 0x8880 + #define GL_FLOAT_RG_NV 0x8881 + #define GL_FLOAT_RGB_NV 0x8882 + #define GL_FLOAT_RGBA_NV 0x8883 + #define GL_FLOAT_R16_NV 0x8884 + #define GL_FLOAT_R32_NV 0x8885 + #define GL_FLOAT_RG16_NV 0x8886 + #define GL_FLOAT_RG32_NV 0x8887 + #define GL_FLOAT_RGB16_NV 0x8888 + #define GL_FLOAT_RGB32_NV 0x8889 + #define GL_FLOAT_RGBA16_NV 0x888A + #define GL_FLOAT_RGBA32_NV 0x888B #endif #ifndef GL_NV_half_float -#define GL_HALF_FLOAT_NV 0x140B + #define GL_HALF_FLOAT_NV 0x140B #endif #ifndef GL_ATI_texture_float -#define GL_RGBA_FLOAT32_ATI 0x8814 -#define GL_RGB_FLOAT32_ATI 0x8815 -#define GL_ALPHA_FLOAT32_ATI 0x8816 -#define GL_INTENSITY_FLOAT32_ATI 0x8817 -#define GL_LUMINANCE_FLOAT32_ATI 0x8818 -#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819 -#define GL_RGBA_FLOAT16_ATI 0x881A -#define GL_RGB_FLOAT16_ATI 0x881B -#define GL_ALPHA_FLOAT16_ATI 0x881C -#define GL_INTENSITY_FLOAT16_ATI 0x881D -#define GL_LUMINANCE_FLOAT16_ATI 0x881E -#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F + #define GL_RGBA_FLOAT32_ATI 0x8814 + #define GL_RGB_FLOAT32_ATI 0x8815 + #define GL_ALPHA_FLOAT32_ATI 0x8816 + #define GL_INTENSITY_FLOAT32_ATI 0x8817 + #define GL_LUMINANCE_FLOAT32_ATI 0x8818 + #define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819 + #define GL_RGBA_FLOAT16_ATI 0x881A + #define GL_RGB_FLOAT16_ATI 0x881B + #define GL_ALPHA_FLOAT16_ATI 0x881C + #define GL_INTENSITY_FLOAT16_ATI 0x881D + #define GL_LUMINANCE_FLOAT16_ATI 0x881E + #define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F #endif #ifndef GL_MIRRORED_REPEAT_IBM -#define GL_MIRRORED_REPEAT_IBM 0x8370 + #define GL_MIRRORED_REPEAT_IBM 0x8370 #endif #ifndef GL_CLAMP_TO_EDGE -#define GL_CLAMP_TO_EDGE 0x812F + #define GL_CLAMP_TO_EDGE 0x812F #endif #ifndef GL_CLAMP_TO_BORDER_ARB -#define GL_CLAMP_TO_BORDER_ARB 0x812D + #define GL_CLAMP_TO_BORDER_ARB 0x812D #endif #ifndef GL_GENERATE_MIPMAP_SGIS -#define GL_GENERATE_MIPMAP_SGIS 0x8191 -#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192 + #define GL_GENERATE_MIPMAP_SGIS 0x8191 + #define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192 #endif #ifndef GL_TEXTURE_3D -#define GL_TEXTURE_3D 0x806F + #define GL_TEXTURE_3D 0x806F #endif #ifndef GL_TEXTURE_2D_ARRAY_EXT -#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A + #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 #endif #ifndef GL_TEXTURE_BINDING_3D -#define GL_TEXTURE_BINDING_3D 0x806A + #define GL_TEXTURE_BINDING_3D 0x806A #endif #ifndef GL_DEPTH_TEXTURE_MODE_ARB -#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B + #define GL_DEPTH_TEXTURE_MODE_ARB 0x884B #endif #ifndef GL_TEXTURE_COMPARE_MODE_ARB -#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C -#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D -#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E + #define GL_TEXTURE_COMPARE_MODE_ARB 0x884C + #define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D + #define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E #endif #ifndef TEXTURE_COMPARE_FAIL_VALUE_ARB -#define TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF + #define TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF #endif #if !defined( GL_MAX_TEXTURE_UNITS ) -#define GL_MAX_TEXTURE_UNITS 0x84E2 + #define GL_MAX_TEXTURE_UNITS 0x84E2 #endif #ifndef GL_TEXTURE_DEPTH -#define GL_TEXTURE_DEPTH 0x8071 + #define GL_TEXTURE_DEPTH 0x8071 #endif namespace osg { diff --git a/include/osg/Texture2DArray b/include/osg/Texture2DArray index bb7133ad4..0461191b9 100644 --- a/include/osg/Texture2DArray +++ b/include/osg/Texture2DArray @@ -17,17 +17,6 @@ #include #include -#ifndef GL_TEXTURE_2D_ARRAY_EXT - #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 -#endif - namespace osg { /** Texture2DArray state class which encapsulates OpenGL 2D array texture functionality.