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