Gamp v0.0.7-36-g24b1eb6
Gamp: Graphics, Audio, Multimedia and Processing
|
OpenGL Rendering Context. More...
#include <GLContext.hpp>
Classes | |
struct | Private |
Public Member Functions | |
GLContext (Private) noexcept | |
Private: Create an invalid instance. | |
GLContext (Private, const wt::SurfaceRef &surface, gamp::handle_t context, GLProfile profile, RenderContextFlags contextFlags, GLVersionNumber glVersion) noexcept | |
Private: Create a new instance of a current context. | |
GLContext (Private, gamp::handle_t context, GLProfile profile, RenderContextFlags contextFlags, GLVersionNumber glVersion) noexcept | |
Private: Create a new instance of a non-current context. | |
~GLContext () noexcept override | |
void | dispose () noexcept override |
void | disposedNotify () override |
constexpr const GLProfile & | glProfile () const noexcept |
constexpr const GLVersionNumber & | glVersion () const |
bool | isCurrent () const noexcept |
bool | isExtensionAvailable (const char *name) const noexcept |
bool | isExtensionAvailable (GLenum name) const noexcept |
bool | makeCurrent (const gamp::wt::SurfaceRef &s) noexcept override |
Make this context current (used for OpenGL, but a NOP on Vulkan) | |
void | releaseContext () noexcept override |
Release this context (used for OpenGL, but a NOP on Vulkan) | |
constexpr const RenderProfile & | renderProfile () const noexcept override |
const jau::type_info & | signature () const noexcept override |
std::string | toString () const override |
![]() | |
RenderContext (Private) noexcept | |
Private: Create an invalid instance. | |
RenderContext (Private, gamp::handle_t context, RenderContextFlags contextFlags, const jau::util::VersionNumber &version) noexcept | |
Private: Create an instance. | |
virtual | ~RenderContext () noexcept=default |
AttachableRef | attachObject (std::string_view key, const AttachableRef &obj) |
Attaches user object for the given name, overwrites old mapping if exists. | |
const gamp::wt::SurfaceRef & | boundSurface () const noexcept |
void | clearAttachedObjects () |
Clears the attachment map. | |
constexpr gamp::handle_t | context () const noexcept |
constexpr RenderContextFlags | contextFlags () const noexcept |
AttachableRef | detachObject (std::string_view key) |
Removes attached object if exists and returns it, otherwise returns nullptr. | |
AttachableRef | getAttachedObject (std::string_view key) const |
Returns the attached user object for the given name. | |
constexpr bool | isValid () const noexcept |
constexpr const jau::util::VersionNumber & | version () const |
Static Public Member Functions | |
static RenderContextPtr | create (const wt::SurfaceRef &surface, gamp::handle_t context, GLProfile profile, RenderContextFlags contextFlags, const char *gl_version_cstr) noexcept |
Create a new instance of a current. | |
static RenderContextPtr | create (gamp::handle_t context, GLProfile profile, RenderContextFlags contextFlags, const char *gl_version_cstr) noexcept |
Create a new instance of a non-current context. | |
static GLContext & | downcast (RenderContext *rc) |
Downcast dereferenced given RenderContext* to GLContext& , throws exception if signature doesn't match GLSignature() | |
static GLContext & | getCurrent () noexcept |
Return thread local GLContext or an invalid GLContext, see isValid() | |
static GLContext & | getInvalid () noexcept |
Returns an invalid GLContext reference. | |
static const jau::type_info & | GLSignature () noexcept |
Additional Inherited Members | |
![]() | |
gamp::wt::SurfaceRef | m_surface |
OpenGL Rendering Context.
Definition at line 423 of file GLContext.hpp.
|
inlinenoexcept |
Private: Create an invalid instance.
Definition at line 437 of file GLContext.hpp.
|
inlinenoexcept |
Private: Create a new instance of a non-current context.
Given profile tag must be one of this class' constant GL
profiles.
Definition at line 440 of file GLContext.hpp.
|
inlinenoexcept |
Private: Create a new instance of a current context.
Given profile tag must be one of this class' constant GL
profiles.
Definition at line 446 of file GLContext.hpp.
|
inlineoverridenoexcept |
Definition at line 455 of file GLContext.hpp.
|
inlinestaticnoexcept |
Create a new instance of a non-current context.
Given profile tag must be one of this class' constant GL
profiles.
Definition at line 462 of file GLContext.hpp.
|
inlinestaticnoexcept |
Create a new instance of a current.
Given profile tag must be one of this class' constant GL
profiles.
Definition at line 468 of file GLContext.hpp.
|
inlineoverridevirtualnoexcept |
Reimplemented from gamp::render::RenderContext.
Definition at line 474 of file GLContext.hpp.
|
inlinestaticnoexcept |
|
inlineconstexproverridevirtualnoexcept |
Reimplemented from gamp::render::RenderContext.
Definition at line 477 of file GLContext.hpp.
|
inlineconstexprnoexcept |
|
inlineconstexpr |
|
inlinestaticnoexcept |
Returns an invalid GLContext reference.
Definition at line 483 of file GLContext.hpp.
|
inlinestatic |
Downcast dereferenced given RenderContext*
to GLContext&
, throws exception if signature doesn't match GLSignature()
Definition at line 488 of file GLContext.hpp.
|
inlinestaticnoexcept |
Return thread local GLContext or an invalid GLContext, see isValid()
Definition at line 499 of file GLContext.hpp.
|
inlineoverridevirtualnoexcept |
Make this context current (used for OpenGL, but a NOP on Vulkan)
Reimplemented from gamp::render::RenderContext.
Definition at line 505 of file GLContext.hpp.
|
inlineoverridevirtualnoexcept |
Release this context (used for OpenGL, but a NOP on Vulkan)
Reimplemented from gamp::render::RenderContext.
Definition at line 513 of file GLContext.hpp.
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 520 of file GLContext.hpp.
|
inlinenoexcept |
Definition at line 524 of file GLContext.hpp.
|
overridevirtualnoexcept |
Reimplemented from gamp::render::RenderContext.
Definition at line 219 of file gamp_sdl2_gl.cpp.
|
inlineoverridevirtual |
Reimplemented from gamp::render::RenderContext.
Definition at line 531 of file GLContext.hpp.
|
inlineoverridevirtual |
Reimplemented from gamp::render::RenderContext.
Definition at line 538 of file GLContext.hpp.