[no bug] DepthTexture not setting color format in construct

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
robmar
Posts: 1125
Joined: Sun Aug 14, 2011 11:30 pm

[no bug] DepthTexture not setting color format in construct

Post by robmar »

I´ve been seeing "Unsupported texture format" errors because the constructor for COpenGLFBODepthTexture leaves the color format to default in the call to COpenGLFBOTexture.

Is this default behaviour okay, or should the header pass the same default format so the error does not list... what is the correct ECF value here?

Code: Select all

//! RTT DepthBuffer constructor
COpenGLFBODepthTexture::COpenGLFBODepthTexture(
        const core::dimension2d<u32>& size,
        const io::path& name,
        COpenGLDriver* driver,
        bool useStencil)
    : COpenGLFBOTexture(size, name, driver, ECF_A8R8G8B8), DepthRenderBuffer(0),   // Robmar mod - set format (was ECF_UNKNOWN by default)
/*  : COpenGLFBOTexture(size, name, driver), DepthRenderBuffer(0),*/
    StencilRenderBuffer(0), UseStencil(useStencil)
 
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: COpenGLFBODepthTexture not setting color format in const

Post by hybrid »

Depth buffer sets its own special format, so it is not required to change this to anything else.
robmar
Posts: 1125
Joined: Sun Aug 14, 2011 11:30 pm

Re: COpenGLFBODepthTexture not setting color format in const

Post by robmar »

Okay, so the error can be ignored. Its like mountain of code to work through! :?
Post Reply