void bindColorBufferTexture(int contextIdx)
Bind color texture.
static constexpr int32_t CUBEMAPTEXTUREINDEX_NEGATIVE_Z
void reshape(int32_t width, int32_t height)
Resize the frame buffer.
void renderToScreen(Engine *engine, int32_t depthBufferTextureId, int32_t colorBufferTextureId)
Render given depth texture and color buffer texture to screen @parma engine engine.
void initialize()
Initialize the frame buffer.
virtual ~FrameBuffer()
Destructor.
static constexpr int32_t CUBEMAPTEXTUREINDEX_NEGATIVE_X
void renderDepthBufferToScreen(Engine *engine)
Render depth buffer to screen or bound frame buffer.
int32_t colorBufferTextureId
void setColorBufferTextureId(int32_t textureId)
Set color buffer texture id.
void setDepthBufferTextureId(int32_t textureId)
Set depth buffer texture id.
void renderToScreen(Engine *engine)
Render to screen or bound frame buffer.
static void disableFrameBuffer()
Switches back to non offscreen main frame buffer to be rendered.
void enableFrameBuffer()
Enables this frame buffer to be rendered.
static constexpr int32_t FRAMEBUFFER_COLORBUFFER
int32_t getColorBufferTextureId()
static constexpr int32_t CUBEMAPTEXTUREINDEX_NONE
static constexpr int32_t CUBEMAPTEXTUREINDEX_POSITIVE_X
static constexpr int32_t TEXTUREID_NONE
static void doPostProcessing(Engine *engine, FrameBuffer *target, FrameBuffer *source, const string &programId, const string &shaderId, FrameBuffer *temporary=nullptr, FrameBuffer *blendToSource=nullptr)
Do post processing into target frame buffer (which can be screen as well when passing nullptr)
static constexpr int32_t FRAMEBUFFER_DEPTHBUFFER
void dispose()
Disposes this frame buffer.
bool ownsColorBufferTexture
static constexpr int32_t CUBEMAPTEXTUREINDEX_NEGATIVE_Y
bool ownsDepthBufferTexture
static constexpr int32_t CUBEMAPTEXTUREINDEX_POSITIVE_Y
static constexpr int32_t CUBEMAPTEXTUREINDEX_POSITIVE_Z
FrameBuffer(int32_t width, int32_t height, int32_t buffers, int32_t cubeMapTextureId=TEXTUREID_NONE, int32_t cubeMapTextureIndex=TEXTUREID_NONE)
Public constructor.
int32_t cubeMapTextureIndex
int32_t getDepthBufferTextureId()
int32_t depthBufferTextureId
int32_t getColorTextureId() override
void bindDepthBufferTexture(int contextIdx)
Bind depth texture.
#define FORBID_CLASS_COPY(CLASS)