diff --git a/include/osg/Texture b/include/osg/Texture index 57e783e18..15b348881 100644 --- a/include/osg/Texture +++ b/include/osg/Texture @@ -179,6 +179,19 @@ #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4 #endif +#ifndef GL_TEXTURE_CUBE_MAP + #define GL_TEXTURE_CUBE_MAP 0x8513 + #define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 + #define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 + #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 + #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 + #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 + #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 + #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A + #define GL_PROXY_TEXTURE_CUBE_MAP 0x851B + #define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C +#endif + #ifndef GL_TEXTURE_BINDING_3D #define GL_TEXTURE_BINDING_3D 0x806A #endif diff --git a/src/osg/Texture.cpp b/src/osg/Texture.cpp index 2e9671749..ac689a4b9 100644 --- a/src/osg/Texture.cpp +++ b/src/osg/Texture.cpp @@ -1626,8 +1626,10 @@ void Texture::applyTexParameters(GLenum target, State& state) const } } - // integer texture are not supported by the shadow - if (extensions->isShadowSupported() && (target == GL_TEXTURE_2D || target == GL_TEXTURE_RECTANGLE) && + // integer textures are not supported by the shadow + // GL_TEXTURE_1D_ARRAY_EXT could be included in the check below but its not yet implemented in OSG + if (extensions->isShadowSupported() && + (target == GL_TEXTURE_2D || target == GL_TEXTURE_1D || target == GL_TEXTURE_RECTANGLE || target == GL_TEXTURE_CUBE_MAP || target == GL_TEXTURE_2D_ARRAY_EXT ) && _internalFormatType != SIGNED_INTEGER && _internalFormatType != UNSIGNED_INTEGER) { if (_use_shadow_comparison)