From Patrick Neary, "Added some lesser used tokens that we use from GL_ARB_texture_rg to computeFormatDataType(), and computeNumComponents() in src/osg/Image.cpp"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.2@14968 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
@@ -425,6 +425,8 @@ GLenum Image::computeFormatDataType(GLenum pixelFormat)
|
||||
{
|
||||
switch (pixelFormat)
|
||||
{
|
||||
case GL_R32F:
|
||||
case GL_RG32F:
|
||||
case GL_LUMINANCE32F_ARB:
|
||||
case GL_LUMINANCE16F_ARB:
|
||||
case GL_LUMINANCE_ALPHA32F_ARB:
|
||||
@@ -466,6 +468,8 @@ GLenum Image::computeFormatDataType(GLenum pixelFormat)
|
||||
|
||||
case GL_RGBA:
|
||||
case GL_RGB:
|
||||
case GL_RED:
|
||||
case GL_RG:
|
||||
case GL_LUMINANCE:
|
||||
case GL_LUMINANCE_ALPHA:
|
||||
case GL_ALPHA: return GL_UNSIGNED_BYTE;
|
||||
@@ -515,6 +519,9 @@ unsigned int Image::computeNumComponents(GLenum pixelFormat)
|
||||
case(GL_ALPHA32UI_EXT): return 1;
|
||||
case(GL_ALPHA16F_ARB): return 1;
|
||||
case(GL_ALPHA32F_ARB): return 1;
|
||||
case(GL_R32F): return 1;
|
||||
case(GL_RG): return 2;
|
||||
case(GL_RG32F): return 2;
|
||||
case(GL_RGB): return 3;
|
||||
case(GL_BGR): return 3;
|
||||
case(GL_RGB8I_EXT): return 3;
|
||||
|
||||
Reference in New Issue
Block a user