Louvre
v2.13.0-1
C++ library for Wayland compositors
|
Wrapper for a native OpenGL framebuffer. More...
Public Member Functions | |
LFramebufferWrapper (GLuint id, const LSize &sizeB, const LPoint &pos=LPoint(0, 0), Float32 scale=1.f) noexcept | |
Constructs an LGLFramebuffer object. More... | |
void | setId (GLuint id) noexcept |
Sets the ID of the native OpenGL framebuffer. More... | |
void | setSizeB (const LSize &sizeB) noexcept |
Sets the buffer size of the framebuffer. More... | |
void | setScale (Float32 scale) noexcept |
Sets the scaling factor of the framebuffer. More... | |
void | setPos (const LPoint &pos) noexcept |
Sets the position of the framebuffer in the global compositor-coordinates space. More... | |
Float32 | scale () const noexcept override |
Gets the scale by which the framebuffer dimensions must be interpreted. More... | |
const LSize & | sizeB () const noexcept override |
Gets the size of the framebuffer in buffer coordinates. More... | |
const LRect & | rect () const noexcept override |
Gets the position and size of the framebuffer in surface coordinates. More... | |
GLuint | id () const noexcept override |
Gets the OpenGL framebuffer ID. 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... | |
LTexture * | texture (Int32) const noexcept override |
Gets the OpenGL texture ID of a specific framebuffer index. More... | |
void | setFramebufferDamage (const LRegion *) noexcept override |
Set the damaged region. More... | |
virtual 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... | |
Wrapper for a native OpenGL framebuffer.
This class facilitates the usage of an existing native OpenGL framebuffer with LPainter.
It requires providing the framebuffer ID, its buffer size, scaling factor and position.
|
inlinenoexcept |
Constructs an LGLFramebuffer object.
id | The ID of the native OpenGL framebuffer. |
sizeB | The buffer size of the framebuffer. |
pos | The position of the framebuffer in the global compositor-coordinates space. |
scale | The scaling factor of the framebuffer (default is 1.0). |
|
inlinenoexcept |
Sets the ID of the native OpenGL framebuffer.
id | The ID of the framebuffer. |
|
inlinenoexcept |
Sets the buffer size of the framebuffer.
sizeB | The buffer size. |
|
inlinenoexcept |
Sets the scaling factor of the framebuffer.
scale | The scaling factor. |
|
inlinenoexcept |
Sets the position of the framebuffer in the global compositor-coordinates space.
pos | The position. |
|
inlineoverridevirtualnoexcept |
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.
|
inlineoverridevirtualnoexcept |
Gets the size of the framebuffer in buffer coordinates.
This method must return the size of the framebuffer in buffer coordinates.
Implements LFramebuffer.
|
inlineoverridevirtualnoexcept |
Gets the position and size of the framebuffer in surface coordinates.
This method must return the position and size of the framebuffer in surface coordinates.
Implements LFramebuffer.
|
inlineoverridevirtualnoexcept |
Gets the OpenGL framebuffer ID.
This method must return the current OpenGL framebuffer ID associated with the instance.
Implements LFramebuffer.
|
inlineoverridevirtualnoexcept |
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.
|
inlineoverridevirtualnoexcept |
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.
Gets the OpenGL texture ID of a specific framebuffer index.
This method must return the OpenGL texture ID associated with the specified framebuffer index or 0 if not available.
index | The index of the framebuffer. |
Implements LFramebuffer.
|
inlineoverridevirtualnoexcept |
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.
|
inlineoverridevirtualnoexcept |
Gets the framebuffer transform.
Implements LFramebuffer.