|
Ream v0.1.0-1
C++ graphics library for Linux
|
Library entry point and global context. More...
#include <RCore.h>
Inheritance diagram for RCore:Classes | |
| struct | Options |
| Options used to initialize RCore. More... | |
Public Member Functions | |
| virtual void | clearGarbage () noexcept=0 |
| Clears resources pending destruction. | |
| const std::vector< RDevice * > & | devices () const noexcept |
| Returns all rendering devices enumerated by the library. | |
| RDevice * | mainDevice () 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 Options & | options () const noexcept |
| Returns the options RCore was created with. | |
| std::shared_ptr< RGLCore > | asGL () noexcept |
| Attempts to cast this RCore instance to an RGLCore. | |
| std::shared_ptr< RRSCore > | asRS () noexcept |
| Attempts to cast this RCore instance to an RRSCore. | |
| std::shared_ptr< RVKCore > | asVK () 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. | |
Static Public Member Functions | |
| static std::shared_ptr< RCore > | Make (const Options &options) noexcept |
| Creates and initializes the single RCore instance. | |
| static std::shared_ptr< RCore > | Get () noexcept |
| Returns the current global RCore instance. | |
Library entry point and global context.
RCore initializes Ream, selecting the platform (DRM, Wayland, Offscreen) and graphics API (Raster, OpenGL, Vulkan). It owns and exposes the available rendering devices (RDevice) and reports information about the active platform and GAPI.
A single instance exists per process; create it with RCore::Make() and access it globally via RCore::Get(). The graphics API can be forced with the CZ_REAM_GAPI environment variable when RGraphicsAPI::Auto is requested.
| struct CZ::RCore::Options |
| Class Members | ||
|---|---|---|
| RGraphicsAPI | graphicsAPI { RGraphicsAPI::Auto } |
Graphics API to use. When set to RGraphicsAPI::Auto, the API is selected automatically and can be forced through the |
| shared_ptr< RPlatformHandle > | platformHandle |
Handle describing the target platform (DRM, Wayland, Offscreen). Must not be null; RCore::Make() fails otherwise. |
|
noexcept |
Destructor.
Creates and initializes the single RCore instance.
Selects the graphics API and platform from options, enumerates the available devices, and logs library information. An explicitly requested API does not silently fall back; only RGraphicsAPI::Auto may fall back (e.g. to OpenGL).
| options | Initialization options. |
|
staticnoexcept |
|
pure virtualnoexcept |
Clears resources pending destruction.
This is primarily used by the OpenGL graphics API. For example, an RGLImage may hold framebuffers, renderbuffers, or other GPU resources that were created in contexts on other threads.
Such resources are queued for deletion and will be released either when the owning thread is destroyed or when this function is called.
|
inlinenoexcept |
Returns all rendering devices enumerated by the library.
|
inlinenoexcept |
Returns the main (default) device.
This is the device used whenever an RDevice* parameter is left as nullptr.
|
inlinenoexcept |
Overrides the main device.
| device | The device to set as main. Must not be null. |
device is null.
|
inlinenoexcept |
Returns the active graphics API.
|
inlinenoexcept |
Returns the active platform.
|
noexcept |
|
noexcept |