Commit 720d115a authored by Nadro's avatar Nadro

- fixed an issue with a fbo color format.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4157 dfc29bdd-3216-0410-991c-e03cc46cb475
parent f23c9708
...@@ -169,6 +169,7 @@ GLint COpenGLTexture::getOpenGLFormatAndParametersFromColorFormat(ECOLOR_FORMAT ...@@ -169,6 +169,7 @@ GLint COpenGLTexture::getOpenGLFormatAndParametersFromColorFormat(ECOLOR_FORMAT
internalformat = GL_R16F; internalformat = GL_R16F;
#else #else
ColorFormat = ECF_A8R8G8B8;
internalformat = GL_RGB8; internalformat = GL_RGB8;
#endif #endif
} }
...@@ -182,6 +183,7 @@ GLint COpenGLTexture::getOpenGLFormatAndParametersFromColorFormat(ECOLOR_FORMAT ...@@ -182,6 +183,7 @@ GLint COpenGLTexture::getOpenGLFormatAndParametersFromColorFormat(ECOLOR_FORMAT
internalformat = GL_RG16F; internalformat = GL_RG16F;
#else #else
ColorFormat = ECF_A8R8G8B8;
internalformat = GL_RGB8; internalformat = GL_RGB8;
#endif #endif
} }
...@@ -195,6 +197,7 @@ GLint COpenGLTexture::getOpenGLFormatAndParametersFromColorFormat(ECOLOR_FORMAT ...@@ -195,6 +197,7 @@ GLint COpenGLTexture::getOpenGLFormatAndParametersFromColorFormat(ECOLOR_FORMAT
internalformat = GL_RGBA16F_ARB; internalformat = GL_RGBA16F_ARB;
#else #else
ColorFormat = ECF_A8R8G8B8;
internalformat = GL_RGBA8; internalformat = GL_RGBA8;
#endif #endif
} }
...@@ -208,6 +211,7 @@ GLint COpenGLTexture::getOpenGLFormatAndParametersFromColorFormat(ECOLOR_FORMAT ...@@ -208,6 +211,7 @@ GLint COpenGLTexture::getOpenGLFormatAndParametersFromColorFormat(ECOLOR_FORMAT
internalformat = GL_R32F; internalformat = GL_R32F;
#else #else
ColorFormat = ECF_A8R8G8B8;
internalformat = GL_RGB8; internalformat = GL_RGB8;
#endif #endif
} }
...@@ -221,6 +225,7 @@ GLint COpenGLTexture::getOpenGLFormatAndParametersFromColorFormat(ECOLOR_FORMAT ...@@ -221,6 +225,7 @@ GLint COpenGLTexture::getOpenGLFormatAndParametersFromColorFormat(ECOLOR_FORMAT
internalformat = GL_RG32F; internalformat = GL_RG32F;
#else #else
ColorFormat = ECF_A8R8G8B8;
internalformat = GL_RGB8; internalformat = GL_RGB8;
#endif #endif
} }
...@@ -234,6 +239,7 @@ GLint COpenGLTexture::getOpenGLFormatAndParametersFromColorFormat(ECOLOR_FORMAT ...@@ -234,6 +239,7 @@ GLint COpenGLTexture::getOpenGLFormatAndParametersFromColorFormat(ECOLOR_FORMAT
internalformat = GL_RGBA32F_ARB; internalformat = GL_RGBA32F_ARB;
#else #else
ColorFormat = ECF_A8R8G8B8;
internalformat = GL_RGBA8; internalformat = GL_RGBA8;
#endif #endif
} }
...@@ -672,6 +678,8 @@ COpenGLFBOTexture::COpenGLFBOTexture(const core::dimension2d<u32>& size, ...@@ -672,6 +678,8 @@ COpenGLFBOTexture::COpenGLFBOTexture(const core::dimension2d<u32>& size,
if (ECF_UNKNOWN == format) if (ECF_UNKNOWN == format)
format = getBestColorFormat(driver->getColorFormat()); format = getBestColorFormat(driver->getColorFormat());
ColorFormat = format;
GLint FilteringType; GLint FilteringType;
InternalFormat = getOpenGLFormatAndParametersFromColorFormat(format, FilteringType, PixelFormat, PixelType); InternalFormat = getOpenGLFormatAndParametersFromColorFormat(format, FilteringType, PixelFormat, PixelType);
......
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