Louvre
v1.2.1-2
C++ library for Wayland compositors
|
#include <LFramebuffer.h>
Base class for creating framebuffers. More...
Base class for creating framebuffers.
The LFramebuffer abstract class provides an interface for creating framebuffers or "groups of framebuffers" that can be used with LPainter.
Framebuffers serve as destinations where rendering can be performed and stored.
For example, each LOutput can have one, two, or more framebuffers (LOutputFramebuffer) that are displayed on screen, or each LSceneView also have its own framebuffer.
If you need to render into a framebuffer and then use it as a texture, consider using the LRenderBuffer class instead.
Public Types | |
enum | Type |
enum | Transform : Int32 |
Enumeration for Framebuffer Transformations. More... | |
Public Member Functions | |
Type | type () const |
virtual | ~LFramebuffer () |
Destructor for the LFramebuffer class. More... | |
virtual Float32 | scale () const =0 |
Get the scale by which the framebuffer dimensions must be interpreted. More... | |
virtual const LSize & | sizeB () const =0 |
Get the size of the framebuffer in buffer coordinates. More... | |
virtual const LRect & | rect () const =0 |
Get the position and size of the framebuffer in surface coordinates. More... | |
virtual GLuint | id () const =0 |
Get the OpenGL framebuffer ID. More... | |
virtual Int32 | buffersCount () const =0 |
Get the number of framebuffers represented by this instance. More... | |
virtual Int32 | currentBufferIndex () const =0 |
Get the index of the framebuffer where the rendering is stored. More... | |
virtual const LTexture * | texture (Int32 index=0) const =0 |
Get the OpenGL texture ID of a specific framebuffer index. More... | |
virtual void | setFramebufferDamage (const LRegion *damage)=0 |
Set the damaged region. More... | |
virtual Transform | transform () const =0 |
Get the framebuffer transformation. More... | |
Public Member Functions inherited from LObject | |
LObject ()=default | |
Constructor of the LObject class. More... | |
~LObject () | |
Destructor of the LObject class. More... | |
std::shared_ptr< const bool > | isAlive () const |
Object's liveness status. More... | |
Static Public Member Functions | |
static bool | is90Transform (Transform transform) |
static Transform | requiredTransform (Transform from, Transform to) |
Static Public Member Functions inherited from LObject | |
static LCompositor * | compositor () |
Quick access to the global compositor instance. More... | |
static LSeat * | seat () |
Quick access to the global seat instance. More... | |
static LCursor * | cursor () |
Quick access to the global cursor instance. More... | |
Protected Attributes | |
Type | m_type |
enum Type |
Enumeration for Framebuffer Transformations.
This enumeration defines different transformations that can be applied to a framebuffer. These transformations include rotations and flips for adjusting the orientation of the framebuffer.
|
inlinevirtual |
Destructor for the LFramebuffer class.
|
inline |
|
inlinestatic |
|
pure virtual |
Get 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.
Implemented in LRenderBuffer, and LOutputFramebuffer.
|
pure virtual |
Get the size of the framebuffer in buffer coordinates.
This method must return the size of the framebuffer in buffer coordinates.
Implemented in LRenderBuffer, and LOutputFramebuffer.
|
pure virtual |
Get the position and size of the framebuffer in surface coordinates.
This method must return the position and size of the framebuffer in surface coordinates.
Implemented in LRenderBuffer, and LOutputFramebuffer.
|
pure virtual |
Get the OpenGL framebuffer ID.
This method must return the current OpenGL framebuffer ID associated with the instance.
Implemented in LRenderBuffer, and LOutputFramebuffer.
|
pure virtual |
Get the number of framebuffers represented by this instance.
This method must return the number of framebuffers represented by this instance.
Implemented in LRenderBuffer, and LOutputFramebuffer.
|
pure virtual |
Get the index of the framebuffer where the rendering is stored.
This method must return the index of the framebuffer where rendering must be performed/stored.
Implemented in LRenderBuffer, and LOutputFramebuffer.
Get the OpenGL texture ID of a specific framebuffer index.
This method must return the OpenGL texture ID associated with the specified framebuffer index.
index | The index of the framebuffer. |
Implemented in LRenderBuffer, and LOutputFramebuffer.
|
pure virtual |
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. |
Implemented in LRenderBuffer, and LOutputFramebuffer.
|
pure virtual |
Get the framebuffer transformation.
This method must return the current framebuffer transformation applied.
Implemented in LRenderBuffer, and LOutputFramebuffer.
|
protected |