diff --git a/include/osg/Texture b/include/osg/Texture index 8dbb18704..b91bdb9ab 100644 --- a/include/osg/Texture +++ b/include/osg/Texture @@ -90,8 +90,8 @@ #define GL_LUMINANCE_ALPHA16F_ARB 0x881F #endif -#ifndef GL_ARB_PIXEL_DATA - #define GL_HALF_FLOAT_ARB 0x140B +#ifndef GL_HALF_FLOAT + #define GL_HALF_FLOAT 0x140B #endif #ifndef GL_NV_texture_shader @@ -136,10 +136,6 @@ #define GL_FLOAT_RGBA32_NV 0x888B #endif -#ifndef GL_NV_half_float - #define GL_HALF_FLOAT_NV 0x140B -#endif - #ifndef GL_ATI_texture_float #define GL_RGBA_FLOAT32_ATI 0x8814 #define GL_RGB_FLOAT32_ATI 0x8815 @@ -394,10 +390,6 @@ #define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF #endif -#ifndef GL_ARB_half_float_pixel - #define GL_HALF_FLOAT 0x140B -#endif - namespace osg { diff --git a/src/osg/Image.cpp b/src/osg/Image.cpp index 15f76ba33..92f1ad496 100644 --- a/src/osg/Image.cpp +++ b/src/osg/Image.cpp @@ -653,7 +653,7 @@ unsigned int Image::computePixelSizeInBits(GLenum format,GLenum type) case(GL_BYTE): case(GL_UNSIGNED_BYTE): return 8*computeNumComponents(format); - case(GL_HALF_FLOAT_NV): + case(GL_HALF_FLOAT): case(GL_SHORT): case(GL_UNSIGNED_SHORT): return 16*computeNumComponents(format); @@ -1651,7 +1651,7 @@ bool Image::isImageTranslucent() const 0xc0000000u, 1)) return true; break; - case(GL_HALF_FLOAT_NV): + case(GL_HALF_FLOAT): if (_findLowerAlphaValueInRow(s(), (unsigned short*)d + offset, (unsigned short)0x3c00, delta)) return true; diff --git a/src/osgPlugins/dds/ReaderWriterDDS.cpp b/src/osgPlugins/dds/ReaderWriterDDS.cpp index 4525a2286..b8dca23d4 100644 --- a/src/osgPlugins/dds/ReaderWriterDDS.cpp +++ b/src/osgPlugins/dds/ReaderWriterDDS.cpp @@ -690,7 +690,7 @@ osg::Image* ReadDDSFile(std::istream& _istream) OSG_INFO << "ReadDDSFile info : format = A16B16G16R16F" << std::endl; internalFormat = GL_RGBA; // why no transparency? pixelFormat = GL_RGBA; - dataType = GL_HALF_FLOAT_NV; + dataType = GL_HALF_FLOAT; break; case 0x0000006E: // Q16W16V16U16 OSG_INFO << "ReadDDSFile info : format = Q16W16V16U16" << std::endl; @@ -704,7 +704,7 @@ osg::Image* ReadDDSFile(std::istream& _istream) return NULL; // internalFormat = GL_RGB; // pixelFormat = must be GL_RED and GL_GREEN -// dataType = GL_HALF_FLOAT_NV; +// dataType = GL_HALF_FLOAT; break; case 0x00000073: // G32R32F OSG_INFO << "ReadDDSFile info : G32R32F format is not supported" @@ -724,7 +724,7 @@ osg::Image* ReadDDSFile(std::istream& _istream) OSG_INFO << "ReadDDSFile info : format = R16F" << std::endl; internalFormat = GL_RGB; pixelFormat = GL_RED; - dataType = GL_HALF_FLOAT_NV; + dataType = GL_HALF_FLOAT; break; case 0x00000074: // A32B32G32R32F OSG_INFO << "ReadDDSFile info : format = A32B32G32R32F" << std::endl; diff --git a/src/osgPlugins/exr/ReaderWriterEXR.cpp b/src/osgPlugins/exr/ReaderWriterEXR.cpp index 247923a1a..d06e32f91 100644 --- a/src/osgPlugins/exr/ReaderWriterEXR.cpp +++ b/src/osgPlugins/exr/ReaderWriterEXR.cpp @@ -103,7 +103,7 @@ unsigned char *exr_load(std::istream& fin, /*RgbaChannels channels =*/ rgbafile.channels(); (*width_ret) = width = dw.max.x - dw.min.x + 1; (*height_ret)=height = dw.max.y - dw.min.y + 1; - (*dataType_ret) = GL_HALF_FLOAT_ARB; + (*dataType_ret) = GL_HALF_FLOAT; pixels.resizeErase (height, width); @@ -261,7 +261,7 @@ protected: writeOK = false; return false; } - if (!( dataType == GL_HALF_FLOAT_ARB || + if (!( dataType == GL_HALF_FLOAT || dataType == GL_FLOAT)) { writeOK = false; @@ -274,7 +274,7 @@ protected: //Copy data from texture to rgba pixel format Array2D outPixels(height,width); //If texture is half format - if (dataType == GL_HALF_FLOAT_ARB) + if (dataType == GL_HALF_FLOAT) { for (long i = height-1; i >= 0; i--) { @@ -361,7 +361,7 @@ protected: int t = height_ret; int r = 1; - if (dataType_ret == GL_HALF_FLOAT_ARB) + if (dataType_ret == GL_HALF_FLOAT) { interNalTextureFormat = numComponents_ret == 1 ? GL_LUMINANCE16F_ARB : diff --git a/src/osgPlugins/vtf/ReaderWriterVTF.cpp b/src/osgPlugins/vtf/ReaderWriterVTF.cpp index ff3df33b6..3aad54efc 100644 --- a/src/osgPlugins/vtf/ReaderWriterVTF.cpp +++ b/src/osgPlugins/vtf/ReaderWriterVTF.cpp @@ -324,7 +324,7 @@ bool ConvertImageFormat(unsigned int vtfFormat, int& internalFormat, case VTF_FORMAT_RGBA16161616F: internalFormat = GL_RGBA; pixelFormat = GL_RGBA; - dataType = GL_HALF_FLOAT_NV; + dataType = GL_HALF_FLOAT; break; case VTF_FORMAT_RGBA16161616: