Commit ba95d4c2 authored by hybrid's avatar hybrid

Avoid the warning about unsupported format when creating FBOs, and try to be...

Avoid the warning about unsupported format when creating FBOs, and try to be more clever with choosing the proper fbo format.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3376 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 68d91c65
......@@ -605,7 +605,7 @@ static bool checkFBOStatus(COpenGLDriver* Driver);
//! RTT ColorFrameBuffer constructor
COpenGLFBOTexture::COpenGLFBOTexture(const core::dimension2d<u32>& size,
const io::path& name, COpenGLDriver* driver,
const ECOLOR_FORMAT format)
ECOLOR_FORMAT format)
: COpenGLTexture(name, driver), DepthTexture(0), ColorFrameBuffer(0)
{
#ifdef _DEBUG
......@@ -615,6 +615,9 @@ COpenGLFBOTexture::COpenGLFBOTexture(const core::dimension2d<u32>& size,
ImageSize = size;
TextureSize = size;
if (ECF_UNKNOWN == format)
format = getBestColorFormat(driver->getColorFormat());
GLint FilteringType;
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