OpenGL implementation of the RenderAPIWrapper.
More...
#include <GLWrapper.h>
|
ErrorCode | initRenderingAPI (I32 argc, char **argv, Configuration &config) override |
| Try and create a valid OpenGL context taking in account the specified command line arguments.
|
|
void | closeRenderingAPI () override |
| Clear everything that was setup in initRenderingAPI()
|
|
bool | drawToWindow (DisplayWindow &window) override |
| Prepare the GPU for rendering a frame.
|
|
void | onRenderThreadLoopStart () override |
|
void | onRenderThreadLoopEnd () override |
|
void | prepareFlushWindow (DisplayWindow &window) override |
|
void | flushWindow (DisplayWindow &window) override |
|
bool | frameStarted () override |
|
bool | frameEnded () override |
|
void | endPerformanceQueries () |
|
void | idle (bool fast) override |
|
void | preFlushCommandBuffer (Handle< GFX::CommandBuffer > commandBuffer) override |
|
void | flushCommand (GFX::CommandBase *cmd) override |
|
void | postFlushCommandBuffer (Handle< GFX::CommandBuffer > commandBuffer) override |
|
void | onThreadCreated (const std::thread::id &threadID, bool isMainRenderThread) override |
|
void | clearStates (GLStateTracker &stateTracker) const |
| Reset as much of the GL default state as possible within the limitations given.
|
|
bool | bindShaderResources (const DescriptorSetEntries &descriptorSetEntries) override |
|
bool | makeTextureViewResident (gl46core::GLubyte bindingSlot, const ImageView &imageView, size_t imageViewHash, SamplerDescriptor sampler, size_t samplerHash) const |
|
bool | setViewportInternal (const Rect< I32 > &viewport) override |
|
bool | setScissorInternal (const Rect< I32 > &scissor) override |
|
void | flushTextureBindQueue () |
|
gl46core::GLuint | getGLTextureView (ImageView srcView, size_t srcViewHash, U8 lifetimeInFrames) const |
|
void | initDescriptorSets () override |
|
void | flushPushConstantsLocks () |
|
RenderTarget_uptr | newRT (const RenderTargetDescriptor &descriptor) const override |
|
GenericVertexData_ptr | newGVD (U32 ringBufferLength, const std::string_view name) const override |
|
ShaderBuffer_uptr | newSB (const ShaderBufferDescriptor &descriptor) const override |
|
OpenGL implementation of the RenderAPIWrapper.
Definition at line 65 of file GLWrapper.h.
◆ HardwareQueryContext
◆ SamplerObjectMap
◆ GlobalQueryTypes
Enumerator |
---|
VERTICES_SUBMITTED | |
PRIMITIVES_GENERATED | |
TESSELLATION_PATCHES | |
TESSELLATION_EVAL_INVOCATIONS | |
GPU_TIME | |
COUNT | |
Definition at line 161 of file GLWrapper.h.
◆ GL_API()
Divide::GL_API::GL_API |
( |
GFXDevice & |
context | ) |
|
◆ AddDebugMessage()
void Divide::GL_API::AddDebugMessage |
( |
const char * |
message, |
|
|
U32 |
id = U32_MAX |
|
) |
| |
|
static |
◆ BindPipeline()
◆ bindShaderResources()
◆ clearStates()
void Divide::GL_API::clearStates |
( |
GLStateTracker & |
stateTracker | ) |
const |
|
private |
Reset as much of the GL default state as possible within the limitations given.
Definition at line 1462 of file GLWrapper.cpp.
◆ closeRenderingAPI()
void Divide::GL_API::closeRenderingAPI |
( |
| ) |
|
|
overrideprivatevirtual |
◆ CreateFenceSync()
gl46core::GLsync Divide::GL_API::CreateFenceSync |
( |
| ) |
|
|
static |
◆ DeleteBuffers()
bool Divide::GL_API::DeleteBuffers |
( |
gl46core::GLuint |
count, |
|
|
gl46core::GLuint * |
buffers |
|
) |
| |
|
static |
◆ DeleteFramebuffers()
bool Divide::GL_API::DeleteFramebuffers |
( |
gl46core::GLuint |
count, |
|
|
gl46core::GLuint * |
framebuffers |
|
) |
| |
|
static |
◆ DeleteSamplers()
bool Divide::GL_API::DeleteSamplers |
( |
gl46core::GLuint |
count, |
|
|
gl46core::GLuint * |
samplers |
|
) |
| |
|
static |
◆ DeleteShaderPrograms()
bool Divide::GL_API::DeleteShaderPrograms |
( |
gl46core::GLuint |
count, |
|
|
gl46core::GLuint * |
programs |
|
) |
| |
|
static |
◆ DestroyFenceSync()
void Divide::GL_API::DestroyFenceSync |
( |
gl46core::GLsync & |
sync | ) |
|
|
static |
◆ Draw()
◆ drawToWindow()
◆ endPerformanceQueries()
void Divide::GL_API::endPerformanceQueries |
( |
| ) |
|
|
private |
◆ flushCommand()
◆ flushPushConstantsLocks()
void Divide::GL_API::flushPushConstantsLocks |
( |
| ) |
|
|
private |
◆ flushTextureBindQueue()
void Divide::GL_API::flushTextureBindQueue |
( |
| ) |
|
|
private |
◆ flushWindow()
◆ frameEnded()
bool Divide::GL_API::frameEnded |
( |
| ) |
|
|
overrideprivatevirtual |
◆ frameStarted()
bool Divide::GL_API::frameStarted |
( |
| ) |
|
|
overrideprivatevirtual |
◆ getGLTextureView()
gl46core::GLuint Divide::GL_API::getGLTextureView |
( |
ImageView |
srcView, |
|
|
size_t |
srcViewHash, |
|
|
U8 |
lifetimeInFrames |
|
) |
| const |
|
private |
◆ GetHardwareQueryPool()
◆ GetMemoryAllocator()
◆ GetMemoryTypeForUsage()
◆ GetSamplerHandle()
gl46core::GLuint Divide::GL_API::GetSamplerHandle |
( |
SamplerDescriptor |
sampler, |
|
|
size_t & |
samplerHashInOut |
|
) |
| |
|
static |
Return the OpenGL sampler object's handle for the given hash value.
Definition at line 1931 of file GLWrapper.cpp.
◆ GetStateTracker()
◆ idle()
void Divide::GL_API::idle |
( |
bool |
fast | ) |
|
|
overrideprivatevirtual |
◆ initDescriptorSets()
void Divide::GL_API::initDescriptorSets |
( |
| ) |
|
|
overrideprivatevirtual |
◆ initRenderingAPI()
Try and create a valid OpenGL context taking in account the specified command line arguments.
Try and create a valid OpenGL context taking in account the specified resolution and command line arguments.
Implements Divide::RenderAPIWrapper.
Definition at line 123 of file GLWrapper.cpp.
◆ makeTextureViewResident()
bool Divide::GL_API::makeTextureViewResident |
( |
gl46core::GLubyte |
bindingSlot, |
|
|
const ImageView & |
imageView, |
|
|
size_t |
imageViewHash, |
|
|
SamplerDescriptor |
sampler, |
|
|
size_t |
samplerHash |
|
) |
| const |
|
private |
◆ newGVD()
GenericVertexData_ptr Divide::GL_API::newGVD |
( |
U32 |
ringBufferLength, |
|
|
const std::string_view |
name |
|
) |
| const |
|
overrideprivatevirtual |
◆ newRT()
◆ newSB()
◆ onRenderThreadLoopEnd()
void Divide::GL_API::onRenderThreadLoopEnd |
( |
| ) |
|
|
overrideprivatevirtual |
◆ onRenderThreadLoopStart()
void Divide::GL_API::onRenderThreadLoopStart |
( |
| ) |
|
|
overrideprivatevirtual |
◆ onThreadCreated()
void Divide::GL_API::onThreadCreated |
( |
const std::thread::id & |
threadID, |
|
|
bool |
isMainRenderThread |
|
) |
| |
|
overrideprivatevirtual |
◆ PopDebugMessage()
void Divide::GL_API::PopDebugMessage |
( |
| ) |
|
|
static |
◆ postFlushCommandBuffer()
◆ preFlushCommandBuffer()
◆ prepareFlushWindow()
void Divide::GL_API::prepareFlushWindow |
( |
DisplayWindow & |
window | ) |
|
|
overrideprivatevirtual |
◆ PushDebugMessage()
void Divide::GL_API::PushDebugMessage |
( |
const char * |
message, |
|
|
U32 |
id = U32_MAX |
|
) |
| |
|
static |
◆ QueueFlush()
void Divide::GL_API::QueueFlush |
( |
| ) |
|
|
staticnoexcept |
◆ setScissorInternal()
bool Divide::GL_API::setScissorInternal |
( |
const Rect< I32 > & |
scissor | ) |
|
|
overrideprivatevirtual |
◆ setViewportInternal()
bool Divide::GL_API::setViewportInternal |
( |
const Rect< I32 > & |
viewport | ) |
|
|
overrideprivatevirtual |
◆ glFramebuffer
◆ glGenericVertexData
◆ glSamplerObject
◆ glShader
◆ glShaderProgram
◆ GLStateTracker
◆ glTexture
◆ glVertexArray
friend class glVertexArray |
|
friend |
◆ _context
◆ _dummyVAO
◆ _performanceQueries
Hardware query objects used for performance measurements.
Definition at line 202 of file GLWrapper.h.
◆ _primitiveQueries
◆ _queryContext
◆ _runQueries
bool Divide::GL_API::_runQueries {false} |
|
private |
◆ _swapBufferTimer
◆ _uniformsMemCommand
◆ _uniformsNeedLock
bool Divide::GL_API::_uniformsNeedLock {false} |
|
private |
◆ InitialSamplerMapSize
constexpr size_t Divide::GL_API::InitialSamplerMapSize = 64u |
|
staticconstexprprivate |
◆ s_fenceSyncCounter
U32 Divide::GL_API::s_fenceSyncCounter {} |
|
staticprivate |
◆ s_glFlushQueued
std::atomic_bool Divide::GL_API::s_glFlushQueued {false} |
|
staticprivate |
◆ s_hardwareQueryPool
◆ s_LockFrameLifetime
constexpr U32 Divide::GL_API::s_LockFrameLifetime = 3u |
|
staticconstexpr |
◆ s_memoryAllocators
◆ s_memoryAllocatorSizes
◆ s_samplerMap
◆ s_samplerMapLock
◆ s_stateTracker
◆ s_TexBindQueue
◆ s_textureViewCache
The documentation for this class was generated from the following files:
- G:/Divide-Framework/Source/Platform/Video/RenderBackend/OpenGL/Headers/GLWrapper.h
- G:/Divide-Framework/Source/Platform/Video/RenderBackend/OpenGL/GLWrapper.cpp