Louvre
v2.13.0-1
C++ library for Wayland compositors
|
Represents a custom render destination framebuffer. More...
Public Member Functions | |
LRenderBuffer (const LSize &sizeB) noexcept | |
Constructor for LRenderBuffer with specified size. More... | |
~LRenderBuffer () noexcept | |
Destructor for LRenderBuffer. More... | |
GLuint | id () const noexcept override |
Retrieve the OpenGL ID of the framebuffer. More... | |
LTexture * | texture (Int32 index=0) const noexcept override |
Retrieve the texture associated with the framebuffer. More... | |
void | setFence () noexcept |
Sets a fence for synchronization after rendering operations. More... | |
void | setSizeB (const LSize &sizeB) noexcept |
Set the size of the framebuffer in buffer coordinates. More... | |
const LSize & | sizeB () const noexcept override |
Retrieve the size of the framebuffer in buffer coordinates. More... | |
const LSize & | size () const noexcept |
Retrieve the size of the framebuffer. More... | |
void | setPos (const LPoint &pos) noexcept |
Set the position of the framebuffer. More... | |
const LPoint & | pos () const noexcept |
Retrieve the position of the framebuffer. More... | |
const LRect & | rect () const noexcept override |
Retrieve the position and size of the framebuffer in surface coordinates. More... | |
void | setScale (Float32 scale) noexcept |
Set the buffer scale to properly scale the rendered content. More... | |
Float32 | scale () const noexcept override |
Gets the scale by which the framebuffer dimensions must be interpreted. More... | |
Int32 | buffersCount () const noexcept override |
Gets the number of internal framebuffers. More... | |
Int32 | currentBufferIndex () const noexcept override |
Gets the index of the current internal framebuffer. More... | |
void | setFramebufferDamage (const LRegion *damage) noexcept override |
Set the damaged region. More... | |
LTransform | transform () const noexcept override |
Gets the framebuffer transform. More... | |
Public Member Functions inherited from LFramebuffer | |
virtual Int32 | bufferAge () const |
Gets the current buffer age. More... | |
Type | type () const noexcept |
Gets the type of LFramebuffer. More... | |
Public Member Functions inherited from LObject | |
LObject (const LObject &) noexcept | |
Copy constructor. More... | |
LObject & | operator= (const LObject &) noexcept |
Assignment operator (each object has its own individual LWeak reference count). More... | |
void | setUserData (UIntPtr data) const noexcept |
Store an unsigned integer value/pointer. More... | |
UIntPtr | userData () const noexcept |
Retrieves the stored unsigned integer value/pointer. More... | |
Additional Inherited Members | |
Public Types inherited from LFramebuffer | |
enum | Type |
Types of framebuffer. More... | |
Protected Member Functions inherited from LObject | |
LObject () noexcept=default | |
Constructor of the LObject class. More... | |
virtual | ~LObject () noexcept |
Destructor of the LObject class. More... | |
void | notifyDestruction () noexcept |
Notifies the object destruction. More... | |
Represents a custom render destination framebuffer.
The LRenderBuffer provides a means to render to a framebuffer instead of an LOutput, allowing the resulting content to be used as a texture.
It can be employed with an LPainter via LPainter::bindFramebuffer().
|
noexcept |
Constructor for LRenderBuffer with specified size.
This constructor creates an LRenderBuffer with the specified size in buffer coordinates.
sizeB | The size of the framebuffer in buffer coordinates. |
|
noexcept |
Destructor for LRenderBuffer.
|
overridevirtualnoexcept |
Retrieve the OpenGL ID of the framebuffer.
This method returns the OpenGL ID of the framebuffer associated with the LRenderBuffer.
Implements LFramebuffer.
Retrieve the texture associated with the framebuffer.
LRenderBuffers always have a single framebuffer, so 0 must always be passed as an argument. The index is part of the LFramebuffer parent class, which may be used by special framebuffers like those of LOutput.
index | The index of the texture (default is 0). |
Implements LFramebuffer.
|
noexcept |
Sets a fence for synchronization after rendering operations.
This method should be called after rendering is complete on the renderbuffer.
It ensures that all rendering commands are finished before the texture is used elsewhere, preventing potential data inconsistencies or rendering artifacts.
|
noexcept |
Set the size of the framebuffer in buffer coordinates.
sizeB | The new size of the framebuffer in buffer coordinates. |
|
overridevirtualnoexcept |
Retrieve the size of the framebuffer in buffer coordinates.
This method returns the size of the framebuffer in buffer coordinates.
Implements LFramebuffer.
|
inlinenoexcept |
|
inlinenoexcept |
Set the position of the framebuffer.
This method sets the position of the framebuffer in surface coordinates.
pos | The new position of the framebuffer. |
|
inlinenoexcept |
Retrieve the position of the framebuffer.
This method returns the position of the framebuffer in surface coordinates.
|
overridevirtualnoexcept |
Retrieve the position and size of the framebuffer in surface coordinates.
The size provided by this rect is equal to size().
Implements LFramebuffer.
|
inlinenoexcept |
Set the buffer scale to properly scale the rendered content.
For example, framebuffers used in HiDPI displays should have a scale of 2 or greater.
scale | The buffer scale factor. |
|
overridevirtualnoexcept |
Gets the scale by which the framebuffer dimensions must be interpreted.
This method must return the scale factor used to interpret the dimensions of the framebuffer.
For example, HiDPI pixmaps/displays may have a scale of 2, whereas low DPI pixmaps/displays may have a scale of 1.
Implements LFramebuffer.
|
overridevirtualnoexcept |
Gets the number of internal framebuffers.
This method is used in implementations like LOutputFramebuffer, which may contain more than one internal framebuffer associated with an LFramebuffer, for example, when double or triple buffering is used.
Implements LFramebuffer.
|
overridevirtualnoexcept |
Gets the index of the current internal framebuffer.
This method must return the index of the current internal framebuffer (where the rendered content will be stored).
Implements LFramebuffer.
|
overridevirtualnoexcept |
Set the damaged region.
This method sets the region in surface coordinates that indicates the parts of the framebuffer that have changed since the last painting was performed.
damage | A pointer to the LRegion object representing the changed region. |
Implements LFramebuffer.
|
overridevirtualnoexcept |
Gets the framebuffer transform.
Implements LFramebuffer.