HDK
|
#include <hgi.h>
Protected Member Functions | |
HGIGL_API bool | _SubmitCmds (HgiCmds *cmds, HgiSubmitWaitType wait) override |
Protected Member Functions inherited from Hgi | |
HGI_API uint64_t | GetUniqueId () |
Additional Inherited Members | |
Static Public Member Functions inherited from Hgi | |
static HGI_API Hgi * | GetPlatformDefaultHgi () |
*** DEPRECATED *** Please use: CreatePlatformDefaultHgi More... | |
static HGI_API HgiUniquePtr | CreatePlatformDefaultHgi () |
static HGI_API bool | IsSupported () |
OpenGL implementation of the Hydra Graphics Interface.
HgiGL expects any GL context(s) to be externally managed. When HgiGL is constructed and during any of its resource create / destroy calls and during command recording operations, it expects that an OpenGL context is valid and current.
When an application uses the same HgiGL instance from multiple GL contexts, the expectations are that:
In the absence of an application provided context arena, the default arena is used with the implied expectation that the same GL context is valid and current for the lifetime of the HgiGL instance.
HGIGL_API HgiGL::HgiGL | ( | ) |
|
override |
|
overrideprotectedvirtual |
Reimplemented from Hgi.
|
overridevirtual |
Returns a BlitCmds object (for temporary use) that is ready to execute resource copy commands. BlitCmds is a lightweight object that should be re-acquired each frame (don't hold onto it after EndEncoding). Thread safety: Each Hgi backend must ensure that a Cmds object can be created on the main thread, recorded into (exclusively) by one secondary thread and be submitted on the main thread. See notes above.
Implements Hgi.
|
overridevirtual |
|
overridevirtual |
Returns a ComputeCmds object (for temporary use) that is ready to record dispatch commands. ComputeCmds is a lightweight object that should be re-acquired each frame (don't hold onto it after EndEncoding). Thread safety: Each Hgi backend must ensure that a Cmds object can be created on the main thread, recorded into (exclusively) by one secondary thread and be submitted on the main thread. See notes above.
Implements Hgi.
|
overridevirtual |
HGIGL_API HgiGLContextArenaHandle HgiGL::CreateContextArena | ( | ) |
Context arena API Please refer to "GL Context Management" for usage expectations.
Creates and return a context arena object handle.
|
overridevirtual |
Returns a GraphicsCmds object (for temporary use) that is ready to record draw commands. GraphicsCmds is a lightweight object that should be re-acquired each frame (don't hold onto it after EndEncoding). Thread safety: Each Hgi backend must ensure that a Cmds object can be created on the main thread, recorded into (exclusively) by one secondary thread and be submitted on the main thread. See notes above.
Implements Hgi.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
HGIGL_API void HgiGL::DestroyContextArena | ( | HgiGLContextArenaHandle * | arenaHandle | ) |
Destroy a context arena. Note: The context arena must be unset (by calling SetContextArena with an empty handle) prior to destruction.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
HGIGL_API HgiGLDevice* HgiGL::GetPrimaryDevice | ( | ) | const |
HGIGL_API void HgiGL::SetContextArena | ( | HgiGLContextArenaHandle const & | arenaHandle | ) |
Set the context arena to manage container resources (currently limited to framebuffer objects) for graphics commands submitted subsequently.
Optionally called by client app at the start of a new rendering frame. We can't rely on StartFrame for anything important, because it is up to the external client to (optionally) call this and they may never do. Hydra doesn't have a clearly defined start or end frame. This can be helpful to insert GPU frame debug markers. Thread safety: Not thread safe. Should be called on the main thread.
Implements Hgi.