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

OpenGL backend implementation of RCore. More...

#include <RGLCore.h>

+ Inheritance diagram for RGLCore:

Public Member Functions

RGLDevicemainDevice () const noexcept
 Returns the main rendering device as an RGLDevice.
 
const REGLClientExtensionsclientEGLExtensions () const noexcept
 Returns the client-level EGL extensions available without a display.
 
const REGLClientProcsclientEGLProcs () const noexcept
 Returns the client-level EGL function pointers loaded at initialization.
 
void clearGarbage () noexcept override
 Releases resources on the calling thread that were queued for destruction.
 
void freeThread () noexcept
 Tears down all GL state owned by the calling thread.
 
- Public Member Functions inherited from RCore
const std::vector< RDevice * > & devices () const noexcept
 Returns all rendering devices enumerated by the library.
 
RDevicemainDevice () const noexcept
 Returns the main (default) device.
 
bool overrideMainDevice (RDevice *device) noexcept
 Overrides the main device.
 
RGraphicsAPI graphicsAPI () const noexcept
 Returns the active graphics API.
 
RPlatform platform () const noexcept
 Returns the active platform.
 
const Optionsoptions () const noexcept
 Returns the options RCore was created with.
 
std::shared_ptr< RGLCoreasGL () noexcept
 Attempts to cast this RCore instance to an RGLCore.
 
std::shared_ptr< RRSCoreasRS () noexcept
 Attempts to cast this RCore instance to an RRSCore.
 
std::shared_ptr< RVKCoreasVK () noexcept
 Attempts to cast this RCore instance to an RVKCore.
 
 ~RCore () noexcept
 Destructor.
 
- Public Member Functions inherited from RObject
 RObject ()=default
 Constructs a default RObject.
 

Additional Inherited Members

- Static Public Member Functions inherited from RCore
static std::shared_ptr< RCoreMake (const Options &options) noexcept
 Creates and initializes the single RCore instance.
 
static std::shared_ptr< RCoreGet () noexcept
 Returns the current global RCore instance.
 

Detailed Description

OpenGL backend implementation of RCore.

Entry point for the OpenGL ES / EGL graphics API. It binds the EGL client API, queries the client-level EGL extensions, and enumerates the rendering devices (RGLDevice), one per DRM node (or a single Wayland device). Obtain it from an RCore via RCore::asGL().

Because the GL backend keeps per-thread EGL contexts and defers destruction of resources created on other threads, it also drives garbage collection through clearGarbage() and freeThread().

Member Function Documentation

◆ mainDevice()

RGLDevice * mainDevice ( ) const
inlinenoexcept

Returns the main rendering device as an RGLDevice.

◆ clientEGLExtensions()

const REGLClientExtensions & clientEGLExtensions ( ) const
inlinenoexcept

Returns the client-level EGL extensions available without a display.

◆ clientEGLProcs()

const REGLClientProcs & clientEGLProcs ( ) const
inlinenoexcept

Returns the client-level EGL function pointers loaded at initialization.

◆ clearGarbage()

void clearGarbage ( )
overridevirtualnoexcept

Releases resources on the calling thread that were queued for destruction.

Frees GL resources (contexts, RGLContextData, etc.) that were destroyed from other threads and could not be freed there because their context was not current.

Implements RCore.

◆ freeThread()

void freeThread ( )
noexcept

Tears down all GL state owned by the calling thread.

Destroys the per-thread EGL/Skia contexts and context data for this thread. Called automatically when a thread terminates; may be invoked explicitly to release early.