Changeset 10820

Show
Ignore:
Timestamp:
11/24/09 14:24:30 (4 years ago)
Author:
robert
Message:

From Wojciech Lewandowski, "I have extended a list of texture targets that can be used with shadow comparison. These targets are avaialble in in OpenGL 3.x shadow sampler variants. Changes are based on current SVN."

Location:
OpenSceneGraph/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/include/osg/Texture

    r10793 r10820  
    180180#endif 
    181181 
     182#ifndef GL_TEXTURE_CUBE_MAP 
     183    #define GL_TEXTURE_CUBE_MAP             0x8513 
     184    #define GL_TEXTURE_BINDING_CUBE_MAP     0x8514 
     185    #define GL_TEXTURE_CUBE_MAP_POSITIVE_X  0x8515 
     186    #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X  0x8516 
     187    #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y  0x8517 
     188    #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y  0x8518 
     189    #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z  0x8519 
     190    #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z  0x851A 
     191    #define GL_PROXY_TEXTURE_CUBE_MAP       0x851B 
     192    #define GL_MAX_CUBE_MAP_TEXTURE_SIZE    0x851C 
     193#endif 
     194 
    182195#ifndef GL_TEXTURE_BINDING_3D 
    183196    #define GL_TEXTURE_BINDING_3D             0x806A 
  • OpenSceneGraph/trunk/src/osg/Texture.cpp

    r10783 r10820  
    16271627    } 
    16281628 
    1629     // integer texture are not supported by the shadow 
    1630     if (extensions->isShadowSupported() && (target == GL_TEXTURE_2D || target == GL_TEXTURE_RECTANGLE) && 
     1629    // integer textures are not supported by the shadow 
     1630    // GL_TEXTURE_1D_ARRAY_EXT could be included in the check below but its not yet implemented in OSG 
     1631    if (extensions->isShadowSupported() &&  
     1632        (target == GL_TEXTURE_2D || target == GL_TEXTURE_1D || target == GL_TEXTURE_RECTANGLE || target == GL_TEXTURE_CUBE_MAP || target == GL_TEXTURE_2D_ARRAY_EXT ) && 
    16311633        _internalFormatType != SIGNED_INTEGER && _internalFormatType != UNSIGNED_INTEGER) 
    16321634    {