33#ifndef OPENGL_COMPOSITOR_H_
34#define OPENGL_COMPOSITOR_H_
56 virtual void Resize(
unsigned int aWidth,
unsigned int aHeight )
override;
62 virtual void SetBuffer(
unsigned int aBufferHandle )
override;
65 inline virtual unsigned int GetBuffer()
const override
77 virtual void DrawBuffer(
unsigned int aBufferHandle )
override;
80 virtual void Begin()
override;
83 virtual void Present()
override;
90 void DrawBuffer(
unsigned int aSourceHandle,
unsigned int aDestHandle );
101 void bindFb(
unsigned int aFb );
A color representation with 4 components: red, green, blue, alpha.
virtual ~OPENGL_COMPOSITOR()
VECTOR2D GetAntialiasRenderingOffset() const
OPENGL_ANTIALIASING_MODE m_currentAntialiasingMode
virtual void Begin() override
Call this at the beginning of each frame.
unsigned int usedBuffers()
Returns number of used buffers.
static const unsigned int DIRECT_RENDERING
virtual unsigned int GetBuffer() const override
Return currently used buffer handle.
VECTOR2I GetScreenSize() const
OPENGL_ANTIALIASING_MODE GetAntialiasingMode() const
void SetAntialiasingMode(OPENGL_ANTIALIASING_MODE aMode)
void clean()
Perform freeing of resources.
virtual void Present() override
Call this to present the output buffer to the screen.
bool m_initialized
Initialization status flag.
std::deque< OPENGL_BUFFER > OPENGL_BUFFERS
void bindFb(unsigned int aFb)
Binds a specific Framebuffer Object.
GLuint m_curFbo
Store the used FBO name in case there was more than one compositor used.
virtual void Initialize() override
Perform primary initialization, necessary to use the object.
GLuint m_depthBuffer
Depth buffer handle.
virtual void ClearBuffer(const COLOR4D &aColor) override
Clear the selected buffer (set by the SetBuffer() function).
std::unique_ptr< OPENGL_PRESENTOR > m_antialiasing
virtual void Resize(unsigned int aWidth, unsigned int aHeight) override
Clear the state of COMPOSITOR, so it has to be reinitialized again with the new dimensions.
OPENGL_BUFFERS m_buffers
Stores information about initialized buffers.
virtual void DrawBuffer(unsigned int aBufferHandle) override
Draw the selected buffer to the output buffer.
GLuint m_mainFbo
Main FBO handle (storing all target textures)
int GetAntialiasSupersamplingFactor() const
unsigned int m_curBuffer
Currently used buffer handle.
GLenum GetBufferTexture(unsigned int aBufferHandle)
virtual void SetBuffer(unsigned int aBufferHandle) override
Set the selected buffer as the rendering target.
virtual unsigned int CreateBuffer() override
Prepare a new buffer that may be used as a rendering target.
Class that handles multitarget rendering (ie.
The Cairo implementation of the graphics abstraction layer.
GLuint textureTarget
Main texture handle.
GLuint attachmentPoint
Point to which an image from texture is attached.