Commit 494e1a91 authored by monstrobishi's avatar monstrobishi

- Changed floating point texture types to non-ARB versions in order to...

 - Changed floating point texture types to non-ARB versions in order to support R16F, R32F, RG16F and RG32F color types.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2543 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 9d1ff035
...@@ -512,7 +512,7 @@ GLint COpenGLFBOTexture::getOpenGLFormatAndParametersFromColorFormat(ECOLOR_FORM ...@@ -512,7 +512,7 @@ GLint COpenGLFBOTexture::getOpenGLFormatAndParametersFromColorFormat(ECOLOR_FORM
colorformat = GL_RED; colorformat = GL_RED;
type = GL_FLOAT; type = GL_FLOAT;
return GL_RGB16F_ARB; return GL_R16F;
#else #else
return GL_RGB8; return GL_RGB8;
#endif #endif
...@@ -520,12 +520,11 @@ GLint COpenGLFBOTexture::getOpenGLFormatAndParametersFromColorFormat(ECOLOR_FORM ...@@ -520,12 +520,11 @@ GLint COpenGLFBOTexture::getOpenGLFormatAndParametersFromColorFormat(ECOLOR_FORM
case ECF_G16R16F: case ECF_G16R16F:
{ {
#ifdef GL_ARB_texture_float #ifdef GL_ARB_texture_float
// We haven't got support for this type specifically, so we should use RGB for a close match.
filtering = GL_NEAREST; filtering = GL_NEAREST;
colorformat = GL_RGB; colorformat = GL_RG;
type = GL_FLOAT; type = GL_FLOAT;
return GL_RGB16F_ARB; return GL_RG16F;
#else #else
return GL_RGB8; return GL_RGB8;
#endif #endif
...@@ -549,7 +548,7 @@ GLint COpenGLFBOTexture::getOpenGLFormatAndParametersFromColorFormat(ECOLOR_FORM ...@@ -549,7 +548,7 @@ GLint COpenGLFBOTexture::getOpenGLFormatAndParametersFromColorFormat(ECOLOR_FORM
colorformat = GL_RED; colorformat = GL_RED;
type = GL_FLOAT; type = GL_FLOAT;
return GL_RGB32F_ARB; return GL_R32F;
#else #else
return GL_RGB8; return GL_RGB8;
#endif #endif
...@@ -557,12 +556,11 @@ GLint COpenGLFBOTexture::getOpenGLFormatAndParametersFromColorFormat(ECOLOR_FORM ...@@ -557,12 +556,11 @@ GLint COpenGLFBOTexture::getOpenGLFormatAndParametersFromColorFormat(ECOLOR_FORM
case ECF_G32R32F: case ECF_G32R32F:
{ {
#ifdef GL_ARB_texture_float #ifdef GL_ARB_texture_float
// We haven't got support for this type specifically, so we should use RGB for a close match.
filtering = GL_NEAREST; filtering = GL_NEAREST;
colorformat = GL_RGB; colorformat = GL_RG;
type = GL_FLOAT; type = GL_FLOAT;
return GL_RGB32F_ARB; return GL_RG32F;
#else #else
return GL_RGB8; return GL_RGB8;
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment