Ream v0.1.0-1
C++ graphics library for Linux
Loading...
Searching...
No Matches
Public Member Functions | List of all members
RGLPass Class Reference

OpenGL backend implementation of RPass. More...

#include <RGLPass.h>

+ Inheritance diagram for RGLPass:

Public Member Functions

 ~RGLPass () noexcept
 Destroys the pass, flushing any pending Skia commands if the SkCanvas API was last used.
 
SkCanvas * getCanvas (bool sync=true) const noexcept override
 Returns the SkCanvas associated with this pass, if available.
 
RPaintergetPainter (bool sync=true) const noexcept override
 Returns the RPainter associated with this pass, if available.
 
void setGeometry (const RSurfaceGeometry &geometry) noexcept override
 Sets transformation matrices.
 
- Public Member Functions inherited from RPass
 ~RPass () noexcept
 Destroys the render pass.
 
CZBitset< RPassCap > caps () const noexcept
 Returns the capabilities enabled for this pass.
 
void resetGeometry () noexcept
 Resets the geometry to the default RSurface geometry.
 
const RSurfaceGeometrygeometry () const noexcept
 Returns the current geometry for this pass.
 
std::shared_ptr< RSurfacesurface () const noexcept
 Returns the destination surface being rendered into.
 
void save () noexcept
 Saves the state of both RPainter and SkCanvas.
 
void restore () noexcept
 Restores the most recently saved state of RPainter and SkCanvas.
 
- Public Member Functions inherited from RObject
 RObject ()=default
 Constructs a default RObject.
 

Detailed Description

OpenGL backend implementation of RPass.

Renders into an RSurface backed by an RGLImage using RGLPainter and/or Skia. It makes the target image's EGL context/surface current on demand and, when switching between the RPainter and SkCanvas APIs, flushes pending commands and resets the shared GL state so the two do not interfere. Created via RSurface::beginPass().

Constructor & Destructor Documentation

◆ ~RGLPass()

~RGLPass ( )
noexcept

Destroys the pass, flushing any pending Skia commands if the SkCanvas API was last used.

Member Function Documentation

◆ getCanvas()

SkCanvas * getCanvas ( bool  sync = true) const
overridevirtualnoexcept

Returns the SkCanvas associated with this pass, if available.

Parameters
syncWhether to synchronize and prepare the canvas for rendering. Pass false only if you intend to update canvas parameters without rendering.
Returns
A pointer to the SkCanvas, or nullptr if SkCanvas is not supported by this pass.

Implements RPass.

◆ getPainter()

RPainter * getPainter ( bool  sync = true) const
overridevirtualnoexcept

Returns the RPainter associated with this pass, if available.

Parameters
syncWhether to synchronize and prepare the painter for rendering. Pass false only if you intend to update painter parameters without rendering.
Returns
A pointer to the RPainter, or nullptr if RPainter is not supported by this pass.

Implements RPass.

◆ setGeometry()

void setGeometry ( const RSurfaceGeometry geometry)
overridevirtualnoexcept

Sets transformation matrices.

Updates both SkCanvas and RPainter transformation matrices to align with the given surface geometry.

Parameters
geometryThe geometry to apply.

Implements RPass.