![]() |
Divide Framework 0.1
A free and open-source 3D Framework under heavy development
|
Rough around the edges Adapter pattern abstracting the actual rendering API and access to the GPU. More...
#include <GFXDevice.h>
Classes | |
struct | GFXBuffers |
struct | GFXDescriptorSet |
struct | ScreenTargets |
Public Types | |
using | GFXDescriptorSets = std::array< GFXDescriptorSet, to_base(DescriptorSetUsage::COUNT)> |
Public Member Functions | |
GFXDevice (PlatformContext &context) | |
~GFXDevice () override | |
ErrorCode | initRenderingAPI (I32 argc, char **argv, RenderAPI API) |
ErrorCode | postInitRenderingAPI (vec2< U16 > renderResolution) |
void | closeRenderingAPI () |
Revert everything that was set up in initRenderingAPI() | |
void | idle (bool fast, U64 deltaTimeUSGame, U64 deltaTimeUSApp) |
After a swap buffer call, the CPU may be idle waiting for the GPU to draw to the screen, so we try to do some processing. | |
void | flushCommandBuffer (Handle< GFX::CommandBuffer > &&commandBuffer) |
void | debugDraw (const SceneRenderState &sceneRenderState, GFX::CommandBuffer &bufferInOut, GFX::MemoryBarrierCommand &memCmdInOut) |
Render all of our immediate mode primitives. This isn't very optimised and most are recreated per frame! | |
void | debugDrawLines (const I64 ID, IM::LineDescriptor descriptor) noexcept |
void | debugDrawBox (const I64 ID, IM::BoxDescriptor descriptor) noexcept |
void | debugDrawOBB (const I64 ID, IM::OBBDescriptor descriptor) noexcept |
void | debugDrawSphere (const I64 ID, IM::SphereDescriptor descriptor) noexcept |
void | debugDrawCone (const I64 ID, IM::ConeDescriptor descriptor) noexcept |
void | debugDrawFrustum (const I64 ID, IM::FrustumDescriptor descriptor) noexcept |
void | validateAndUploadDescriptorSets () |
void | generateCubeMap (RenderPassParams ¶ms, U16 arrayOffset, const vec3< F32 > &pos, vec2< F32 > zPlanes, GFX::CommandBuffer &commandsInOut, GFX::MemoryBarrierCommand &memCmdInOut, mat4< F32 > *viewProjectionOut=nullptr) |
Generate a cube texture and store it in the provided RenderTarget. | |
void | generateDualParaboloidMap (RenderPassParams ¶ms, U16 arrayOffset, const vec3< F32 > &pos, vec2< F32 > zPlanes, GFX::CommandBuffer &bufferInOut, GFX::MemoryBarrierCommand &memCmdInOut, mat4< F32 > *viewProjectionOut=nullptr) |
const GFXShaderData::CamData & | cameraData () const noexcept |
const GFXShaderData::PrevFrameData & | previousFrameData (PlayerIndex player) const noexcept |
bool | setViewport (const Rect< I32 > &viewport) |
Returns true if the viewport was changed. | |
bool | setViewport (I32 x, I32 y, I32 width, I32 height) |
bool | setScissor (const Rect< I32 > &scissor) |
bool | setScissor (I32 x, I32 y, I32 width, I32 height) |
void | setDepthRange (vec2< F32 > depthRange) |
void | setPreviousViewProjectionMatrix (PlayerIndex player, const mat4< F32 > &prevViewMatrix, const mat4< F32 > prevProjectionMatrix) |
void | setCameraSnapshot (PlayerIndex index, const CameraSnapshot &snapshot) noexcept |
CameraSnapshot & | getCameraSnapshot (PlayerIndex index) noexcept |
const CameraSnapshot & | getCameraSnapshot (PlayerIndex index) const noexcept |
F32 | renderingAspectRatio () const noexcept |
vec2< U16 > | renderingResolution () const noexcept |
void | setScreenMSAASampleCount (U8 sampleCount) |
void | setShadowMSAASampleCount (ShadowType type, U8 sampleCount) |
void | screenshot (std::string_view fileName, GFX::CommandBuffer &bufferInOut) const |
Save a screenshot in TGA format. | |
ShaderComputeQueue & | shaderComputeQueue () noexcept |
const ShaderComputeQueue & | shaderComputeQueue () const noexcept |
Renderer & | getRenderer () const |
const RenderStateBlock & | getNoDepthTestBlock () const noexcept |
returns the standard state block | |
const RenderStateBlock & | get2DStateBlock () const noexcept |
GFXRTPool & | renderTargetPool () noexcept |
const GFXRTPool & | renderTargetPool () const noexcept |
Handle< ShaderProgram > | getRTPreviewShader (bool depthOnly) const noexcept |
void | registerDrawCall () noexcept |
void | registerDrawCalls (U32 count) noexcept |
DebugView * | addDebugView (const std::shared_ptr< DebugView > &view) |
bool | removeDebugView (DebugView *view) |
void | toggleDebugView (I16 index, bool state) |
void | toggleDebugGroup (I16 groupID, bool state) |
void | getDebugViewNames (vector< std::tuple< string, I16, I16, bool > > &namesOut) |
bool | getDebugGroupState (I16 groupID) const |
PerformanceMetrics & | getPerformanceMetrics () noexcept |
const PerformanceMetrics & | getPerformanceMetrics () const noexcept |
void | onThreadCreated (const std::thread::id &threadID, bool isMainRenderThread) const |
RenderTarget_uptr | newRT (const RenderTargetDescriptor &descriptor) |
Create and return a new framebuffer. | |
IMPrimitive * | newIMP (std::string_view name) |
Create and return a new immediate mode emulation primitive. | |
bool | destroyIMP (IMPrimitive *&primitive) |
VertexBuffer_ptr | newVB (const VertexBuffer::Descriptor &descriptor) |
Create and return a new vertex array (VAO + VB + IB). | |
GenericVertexData_ptr | newGVD (U32 ringBufferLength, std::string_view name) |
ShaderBuffer_uptr | newSB (const ShaderBufferDescriptor &descriptor) |
Pipeline * | newPipeline (const PipelineDescriptor &descriptor) |
Create and return a new graphics pipeline. This is only used for caching and doesn't use the object arena. | |
void | drawTextureInViewport (const ImageView &texture, SamplerDescriptor sampler, const Rect< I32 > &viewport, bool convertToSrgb, bool drawToDepthOnly, bool drawBlend, GFX::CommandBuffer &bufferInOut) |
void | blurTarget (RenderTargetHandle &blurSource, RenderTargetHandle &blurBuffer, const RenderTargetHandle &blurTarget, RTAttachmentType att, RTColourAttachmentSlot slot, I32 kernelSize, bool gaussian, U8 layerCount, GFX::CommandBuffer &bufferInOut) |
void | updateSceneDescriptorSet (GFX::CommandBuffer &bufferInOut, GFX::MemoryBarrierCommand &memCmdInOut) const |
GFXDescriptorSet & | descriptorSet (DescriptorSetUsage usage) noexcept |
const GFXDescriptorSet & | descriptorSet (DescriptorSetUsage usage) const noexcept |
PROPERTY_RW (MaterialDebugFlag, materialDebugFlag, MaterialDebugFlag::COUNT) | |
PROPERTY_RW (RenderAPI, renderAPI, RenderAPI::COUNT) | |
PROPERTY_RW (bool, queryPerformanceStats, false) | |
PROPERTY_RW (bool, enableOcclusionCulling, true) | |
PROPERTY_R_IW (U32, frameDrawCalls, 0u) | |
PROPERTY_R_IW (U32, frameDrawCallsPrev, 0u) | |
PROPERTY_R_IW (vec4< U32 >, lastCullCount, VECTOR4_ZERO) | |
X = culled items HiZ, Y = culled items overflow, Z = baseInstance == 0 count, W = skipped cull count. | |
PROPERTY_R_IW (Rect< I32 >, activeViewport, UNIT_VIEWPORT) | |
PROPERTY_R_IW (Rect< I32 >, activeScissor, UNIT_VIEWPORT) | |
PROPERTY_R (std::unique_ptr< SceneShaderData >, sceneData) | |
PROPERTY_R (ImShaders_uptr, imShaders) | |
bool | framePreRender (const FrameEvent &evt) override |
framePreRenderStarted is called when we need to start processing the visual aspect of a scene | |
bool | frameStarted (const FrameEvent &evt) override |
bool | frameEnded (const FrameEvent &evt) noexcept override |
frameEnded is called after the buffers have been swapped | |
![]() | |
PlatformContextComponent (PlatformContext &context) noexcept | |
virtual | ~PlatformContextComponent ()=default |
PlatformContext & | context () noexcept |
const PlatformContext & | context () const noexcept |
![]() | |
NonCopyable (const NonCopyable &)=delete | |
NonCopyable & | operator= (const NonCopyable &)=delete |
NonCopyable (NonCopyable &&)=default | |
NonCopyable & | operator= (NonCopyable &&)=default |
![]() | |
FrameListener (const Str< 64 > &name, FrameListenerManager &parent, U32 callOrder) | |
Either give it a name. | |
virtual | ~FrameListener () override |
bool | operator< (FrameListener &that) const noexcept |
![]() | |
GUIDWrapper () noexcept | |
GUIDWrapper (const GUIDWrapper &old) noexcept | |
GUIDWrapper (GUIDWrapper &&old) noexcept | |
virtual | ~GUIDWrapper ()=default |
FORCE_INLINE I64 | getGUID () const noexcept |
GUIDWrapper & | operator= (const GUIDWrapper &old)=delete |
GUIDWrapper & | operator= (GUIDWrapper &&other)=delete |
Static Public Member Functions | |
static void | FrameInterpolationFactor (const D64 interpolation) noexcept |
static D64 | FrameInterpolationFactor () noexcept |
static U64 | FrameCount () noexcept |
static const DeviceInformation & | GetDeviceInformation () noexcept |
static void | OverrideDeviceInformation (const DeviceInformation &info) noexcept |
static bool | IsSubmitCommand (GFX::CommandType type) noexcept |
![]() | |
static I64 | generateGUID () noexcept |
Protected Member Functions | |
void | update (U64 deltaTimeUSFixed, U64 deltaTimeUSApp) |
ErrorCode | initDescriptorSets () |
void | setScreenMSAASampleCountInternal (U8 sampleCount) |
void | setShadowMSAASampleCountInternal (ShadowType type, U8 sampleCount) |
bool | fitViewportInWindow (U16 w, U16 h) |
void | drawToWindow (DisplayWindow &window) |
void | flushWindow (DisplayWindow &window) |
void | onWindowSizeChange (const SizeChangeParams ¶ms) |
The main entry point for any resolution change request. | |
void | onResolutionChange (const SizeChangeParams ¶ms) |
void | initDebugViews () |
void | renderDebugViews (Rect< I32 > targetViewport, I32 padding, GFX::CommandBuffer &bufferInOut, GFX::MemoryBarrierCommand &memCmdInOut) |
void | flushCommandBufferInternal (Handle< GFX::CommandBuffer > commandBuffer) |
PipelineDescriptor & | getDebugPipeline (const IM::BaseDescriptor &descriptor) noexcept |
void | debugDrawLines (GFX::CommandBuffer &bufferInOut, GFX::MemoryBarrierCommand &memCmdInOut) |
void | debugDrawBoxes (GFX::CommandBuffer &bufferInOut, GFX::MemoryBarrierCommand &memCmdInOut) |
void | debugDrawOBBs (GFX::CommandBuffer &bufferInOut, GFX::MemoryBarrierCommand &memCmdInOut) |
void | debugDrawCones (GFX::CommandBuffer &bufferInOut, GFX::MemoryBarrierCommand &memCmdInOut) |
void | debugDrawSpheres (GFX::CommandBuffer &bufferInOut, GFX::MemoryBarrierCommand &memCmdInOut) |
void | debugDrawFrustums (GFX::CommandBuffer &bufferInOut, GFX::MemoryBarrierCommand &memCmdInOut) |
void | renderDebugUI (const Rect< I32 > &targetViewport, GFX::CommandBuffer &bufferInOut, GFX::MemoryBarrierCommand &memCmdInOut) |
void | occlusionCull (const RenderPass::PassData &passData, Handle< Texture > hizBuffer, SamplerDescriptor sampler, const CameraSnapshot &cameraSnapshot, bool countCulledNodes, GFX::CommandBuffer &bufferInOut) |
std::pair< Handle< Texture >, SamplerDescriptor > | constructHIZ (RenderTargetID depthBuffer, RenderTargetID HiZTarget, GFX::CommandBuffer &cmdBufferInOut) |
RenderAPIWrapper & | getAPIImpl () |
const RenderAPIWrapper & | getAPIImpl () const |
![]() | |
NonCopyable ()=default | |
~NonCopyable ()=default | |
![]() | |
void | setCallOrder (const U32 order) noexcept |
virtual bool | frameStarted (const FrameEvent &evt) |
virtual bool | framePreRender (const FrameEvent &evt) |
framePreRenderStarted is called when we need to start processing the visual aspect of a scene | |
virtual bool | frameSceneRenderStarted (const FrameEvent &evt) |
frameSceneRenderStarted is called right before rendering the scene for the current player starts | |
virtual bool | frameSceneRenderEnded (const FrameEvent &evt) |
frameSceneRenderEnded is called immediately after scene rendering for the current player has ended but before any blitting operations | |
virtual bool | frameRenderingQueued (const FrameEvent &evt) |
virtual bool | framePostRender (const FrameEvent &evt) |
virtual bool | frameEnded (const FrameEvent &evt) |
frameEnded is called after the buffers have been swapped | |
PROPERTY_R_IW (bool, enabled, false) | |
PROPERTY_RW (Str< 64 >, name) | |
Private Types | |
using | IMPrimitivePool = MemoryPool< IMPrimitive, 1<< 15 > |
Private Member Functions | |
bool | uploadGPUBlock () |
Upload draw related data to the GPU (view & projection matrices, viewport settings, etc) | |
void | resizeGPUBlocks (size_t targetSizeCam, size_t targetSizeCullCounter) |
void | setClipPlanes (const FrustumClipPlanes &clipPlanes) |
set a new list of clipping planes. The old one is discarded | |
void | renderFromCamera (const CameraSnapshot &cameraSnapshot) |
void | shadowingSettings (const F32 lightBleedBias, const F32 minShadowVariance) noexcept |
void | worldAOViewProjectionMatrix (const mat4< F32 > &vpMatrix) noexcept |
ErrorCode | createAPIInstance (RenderAPI api) |
void | renderThread () |
void | addRenderWork (DELEGATE< void > &&work) |
Static Private Attributes | |
static constexpr U8 | s_invalidQueueSampleCount = 255u |
static constexpr U8 | MAX_CAMERA_SNAPSHOTS = 32u |
static IMPrimitivePool | s_IMPrimitivePool {} |
static D64 | s_interpolationFactor = 1.0 |
static U64 | s_frameCount = 0u |
static DeviceInformation | s_deviceInformation {} |
Friends | |
class | Attorney::GFXDeviceAPI |
class | Attorney::GFXDeviceKernel |
class | Attorney::GFXDeviceGraphicsResource |
class | Attorney::GFXDeviceGFXRTPool |
class | Attorney::GFXDeviceShaderProgram |
class | Attorney::GFXDeviceShadowMap |
class | Attorney::GFXDeviceWindowManager |
class | Attorney::GFXDeviceProjectManager |
class | RenderPassManager |
class | RenderPass |
class | RenderPassExecutor |
Additional Inherited Members | |
![]() | |
PlatformContext & | _context |
![]() | |
const I64 | _guid |
Rough around the edges Adapter pattern abstracting the actual rendering API and access to the GPU.
Definition at line 214 of file GFXDevice.h.
using Divide::GFXDevice::GFXDescriptorSets = std::array<GFXDescriptorSet, to_base(DescriptorSetUsage::COUNT)> |
Definition at line 246 of file GFXDevice.h.
|
private |
Definition at line 574 of file GFXDevice.h.
|
explicit |
Definition at line 320 of file GFXDevice.cpp.
|
override |
Definition at line 327 of file GFXDevice.cpp.
Definition at line 2740 of file GFXDevice.cpp.
|
private |
Definition at line 515 of file GFXDevice.cpp.
void Divide::GFXDevice::blurTarget | ( | RenderTargetHandle & | blurSource, |
RenderTargetHandle & | blurBuffer, | ||
const RenderTargetHandle & | blurTarget, | ||
RTAttachmentType | att, | ||
RTColourAttachmentSlot | slot, | ||
I32 | kernelSize, | ||
bool | gaussian, | ||
U8 | layerCount, | ||
GFX::CommandBuffer & | bufferInOut | ||
) |
blurTarget | can be the same as source |
Definition at line 1642 of file GFXDevice.cpp.
|
noexcept |
Definition at line 2078 of file GFXDevice.cpp.
void Divide::GFXDevice::closeRenderingAPI | ( | ) |
Revert everything that was set up in initRenderingAPI()
Definition at line 1228 of file GFXDevice.cpp.
|
protected |
Transform our depth buffer to a HierarchicalZ buffer (for occlusion queries and screen space reflections) Based on RasterGrid implementation: http://rastergrid.com/blog/2010/10/hierarchical-z-map-based-occlusion-culling/ Modified with nVidia sample code: https://github.com/nvpro-samples/gl_occlusion_culling
Definition at line 2272 of file GFXDevice.cpp.
Definition at line 332 of file GFXDevice.cpp.
void Divide::GFXDevice::debugDraw | ( | const SceneRenderState & | sceneRenderState, |
GFX::CommandBuffer & | bufferInOut, | ||
GFX::MemoryBarrierCommand & | memCmdInOut | ||
) |
Render all of our immediate mode primitives. This isn't very optimised and most are recreated per frame!
Definition at line 3029 of file GFXDevice.cpp.
|
noexcept |
Definition at line 2877 of file GFXDevice.cpp.
|
protected |
Definition at line 2882 of file GFXDevice.cpp.
|
noexcept |
Definition at line 2966 of file GFXDevice.cpp.
|
protected |
Definition at line 2971 of file GFXDevice.cpp.
|
noexcept |
Definition at line 2997 of file GFXDevice.cpp.
|
protected |
Definition at line 3002 of file GFXDevice.cpp.
|
noexcept |
Definition at line 2846 of file GFXDevice.cpp.
|
protected |
Definition at line 2851 of file GFXDevice.cpp.
|
noexcept |
Definition at line 2907 of file GFXDevice.cpp.
|
protected |
Definition at line 2912 of file GFXDevice.cpp.
|
noexcept |
Definition at line 2936 of file GFXDevice.cpp.
|
protected |
Definition at line 2941 of file GFXDevice.cpp.
|
inlinenoexcept |
Definition at line 209 of file GFXDevice.inl.
|
inlinenoexcept |
Definition at line 204 of file GFXDevice.inl.
bool Divide::GFXDevice::destroyIMP | ( | IMPrimitive *& | primitive | ) |
Definition at line 3061 of file GFXDevice.cpp.
void Divide::GFXDevice::drawTextureInViewport | ( | const ImageView & | texture, |
SamplerDescriptor | sampler, | ||
const Rect< I32 > & | viewport, | ||
bool | convertToSrgb, | ||
bool | drawToDepthOnly, | ||
bool | drawBlend, | ||
GFX::CommandBuffer & | bufferInOut | ||
) |
Definition at line 2435 of file GFXDevice.cpp.
|
protected |
Definition at line 1336 of file GFXDevice.cpp.
Definition at line 1832 of file GFXDevice.cpp.
void Divide::GFXDevice::flushCommandBuffer | ( | Handle< GFX::CommandBuffer > && | commandBuffer | ) |
Definition at line 2120 of file GFXDevice.cpp.
|
protected |
Definition at line 2129 of file GFXDevice.cpp.
|
protected |
Definition at line 1345 of file GFXDevice.cpp.
|
inlinestaticnoexcept |
Definition at line 340 of file GFXDevice.h.
|
overridevirtualnoexcept |
frameEnded is called after the buffers have been swapped
Reimplemented from Divide::FrameListener.
Definition at line 1403 of file GFXDevice.cpp.
|
inlinestaticnoexcept |
Definition at line 339 of file GFXDevice.h.
|
inlinestaticnoexcept |
Definition at line 338 of file GFXDevice.h.
|
overridevirtual |
framePreRenderStarted is called when we need to start processing the visual aspect of a scene
Reimplemented from Divide::FrameListener.
Definition at line 1366 of file GFXDevice.cpp.
|
overridevirtual |
Adapter patern instead of pure interface for the same reason as the Ogre boys pointed out: Implement what you need without filling classes with dummy functions frameStarted is calld at the beggining of a new frame before processing the logic aspect of a scene
Reimplemented from Divide::FrameListener.
Definition at line 1371 of file GFXDevice.cpp.
void Divide::GFXDevice::generateCubeMap | ( | RenderPassParams & | params, |
U16 | arrayOffset, | ||
const vec3< F32 > & | pos, | ||
vec2< F32 > | zPlanes, | ||
GFX::CommandBuffer & | commandsInOut, | ||
GFX::MemoryBarrierCommand & | memCmdInOut, | ||
mat4< F32 > * | viewProjectionOut = nullptr |
||
) |
Generate a cube texture and store it in the provided RenderTarget.
Generate a cubemap from the given position It renders the entire scene graph (with culling) as default use the callback param to override the draw function
Definition at line 1501 of file GFXDevice.cpp.
void Divide::GFXDevice::generateDualParaboloidMap | ( | RenderPassParams & | params, |
U16 | arrayOffset, | ||
const vec3< F32 > & | pos, | ||
vec2< F32 > | zPlanes, | ||
GFX::CommandBuffer & | bufferInOut, | ||
GFX::MemoryBarrierCommand & | memCmdInOut, | ||
mat4< F32 > * | viewProjectionOut = nullptr |
||
) |
Definition at line 1573 of file GFXDevice.cpp.
|
inlinenoexcept |
Definition at line 123 of file GFXDevice.inl.
|
inlineprotected |
Definition at line 450 of file GFXDevice.h.
|
inlineprotected |
Definition at line 451 of file GFXDevice.h.
|
noexcept |
Definition at line 2073 of file GFXDevice.cpp.
|
noexcept |
Definition at line 2068 of file GFXDevice.cpp.
bool Divide::GFXDevice::getDebugGroupState | ( | I16 | groupID | ) | const |
Definition at line 2804 of file GFXDevice.cpp.
|
protectednoexcept |
Definition at line 2832 of file GFXDevice.cpp.
void Divide::GFXDevice::getDebugViewNames | ( | vector< std::tuple< string, I16, I16, bool > > & | namesOut | ) |
Definition at line 2821 of file GFXDevice.cpp.
|
inlinestaticnoexcept |
Definition at line 158 of file GFXDevice.inl.
|
inlinenoexcept |
returns the standard state block
Definition at line 128 of file GFXDevice.inl.
|
inlinenoexcept |
Definition at line 199 of file GFXDevice.inl.
|
inlinenoexcept |
Definition at line 194 of file GFXDevice.inl.
|
inline |
Definition at line 117 of file GFXDevice.inl.
|
inlinenoexcept |
Definition at line 143 of file GFXDevice.inl.
After a swap buffer call, the CPU may be idle waiting for the GPU to draw to the screen, so we try to do some processing.
Definition at line 1318 of file GFXDevice.cpp.
|
protected |
Definition at line 2483 of file GFXDevice.cpp.
|
protected |
Definition at line 222 of file GFXDevice.cpp.
Create a display context using the selected API and create all of the needed primitives needed for frame rendering
Definition at line 364 of file GFXDevice.cpp.
|
inlinestaticnoexcept |
Definition at line 168 of file GFXDevice.inl.
|
inline |
Definition at line 219 of file GFXDevice.inl.
IMPrimitive * Divide::GFXDevice::newIMP | ( | std::string_view | name | ) |
Create and return a new immediate mode emulation primitive.
Definition at line 3055 of file GFXDevice.cpp.
Pipeline * Divide::GFXDevice::newPipeline | ( | const PipelineDescriptor & | descriptor | ) |
Create and return a new graphics pipeline. This is only used for caching and doesn't use the object arena.
Definition at line 3074 of file GFXDevice.cpp.
RenderTarget_uptr Divide::GFXDevice::newRT | ( | const RenderTargetDescriptor & | descriptor | ) |
Create and return a new framebuffer.
Definition at line 3041 of file GFXDevice.cpp.
|
inline |
Create and return a new shader buffer. The OpenGL implementation creates either an 'Uniform Buffer Object' if unbound is false or a 'Shader Storage Block Object' otherwise
Definition at line 214 of file GFXDevice.inl.
VertexBuffer_ptr Divide::GFXDevice::newVB | ( | const VertexBuffer::Descriptor & | descriptor | ) |
Create and return a new vertex array (VAO + VB + IB).
Definition at line 3101 of file GFXDevice.cpp.
|
protected |
Definition at line 2351 of file GFXDevice.cpp.
|
protected |
Definition at line 1776 of file GFXDevice.cpp.
void Divide::GFXDevice::onThreadCreated | ( | const std::thread::id & | threadID, |
bool | isMainRenderThread | ||
) | const |
Definition at line 1309 of file GFXDevice.cpp.
|
protected |
The main entry point for any resolution change request.
Definition at line 1768 of file GFXDevice.cpp.
|
inlinestaticnoexcept |
Definition at line 163 of file GFXDevice.inl.
Definition at line 598 of file GFXDevice.cpp.
|
noexcept |
Definition at line 2083 of file GFXDevice.cpp.
Divide::GFXDevice::PROPERTY_R | ( | ImShaders_uptr | , |
imShaders | |||
) |
Divide::GFXDevice::PROPERTY_R | ( | std::unique_ptr< SceneShaderData > | , |
sceneData | |||
) |
Divide::GFXDevice::PROPERTY_R_IW | ( | Rect< I32 > | , |
activeScissor | , | ||
UNIT_VIEWPORT | |||
) |
Divide::GFXDevice::PROPERTY_R_IW | ( | Rect< I32 > | , |
activeViewport | , | ||
UNIT_VIEWPORT | |||
) |
Divide::GFXDevice::PROPERTY_R_IW | ( | U32 | , |
frameDrawCalls | , | ||
0u | |||
) |
Divide::GFXDevice::PROPERTY_R_IW | ( | U32 | , |
frameDrawCallsPrev | , | ||
0u | |||
) |
Divide::GFXDevice::PROPERTY_R_IW | ( | vec4< U32 > | , |
lastCullCount | , | ||
VECTOR4_ZERO | |||
) |
X = culled items HiZ, Y = culled items overflow, Z = baseInstance == 0 count, W = skipped cull count.
Divide::GFXDevice::PROPERTY_RW | ( | bool | , |
enableOcclusionCulling | , | ||
true | |||
) |
Divide::GFXDevice::PROPERTY_RW | ( | bool | , |
queryPerformanceStats | , | ||
false | |||
) |
Divide::GFXDevice::PROPERTY_RW | ( | MaterialDebugFlag | , |
materialDebugFlag | , | ||
MaterialDebugFlag::COUNT | |||
) |
Divide::GFXDevice::PROPERTY_RW | ( | RenderAPI | , |
renderAPI | , | ||
RenderAPI::COUNT | |||
) |
|
inlinenoexcept |
Definition at line 148 of file GFXDevice.inl.
|
inlinenoexcept |
Definition at line 153 of file GFXDevice.inl.
bool Divide::GFXDevice::removeDebugView | ( | DebugView * | view | ) |
Definition at line 2770 of file GFXDevice.cpp.
|
protected |
Definition at line 2461 of file GFXDevice.cpp.
|
protected |
Definition at line 2628 of file GFXDevice.cpp.
|
private |
Definition at line 1959 of file GFXDevice.cpp.
|
inlinenoexcept |
Definition at line 179 of file GFXDevice.inl.
Definition at line 174 of file GFXDevice.inl.
|
inlinenoexcept |
Definition at line 138 of file GFXDevice.inl.
|
inlinenoexcept |
Definition at line 133 of file GFXDevice.inl.
|
private |
Definition at line 491 of file GFXDevice.cpp.
|
private |
Definition at line 532 of file GFXDevice.cpp.
void Divide::GFXDevice::screenshot | ( | std::string_view | fileName, |
GFX::CommandBuffer & | bufferInOut | ||
) | const |
Save a screenshot in TGA format.
Extract the pixel data from the main render target's first colour attachment and save it as a TGA image.
Definition at line 3120 of file GFXDevice.cpp.
|
noexcept |
Definition at line 2063 of file GFXDevice.cpp.
|
private |
set a new list of clipping planes. The old one is discarded
Definition at line 1922 of file GFXDevice.cpp.
Definition at line 1949 of file GFXDevice.cpp.
void Divide::GFXDevice::setPreviousViewProjectionMatrix | ( | PlayerIndex | player, |
const mat4< F32 > & | prevViewMatrix, | ||
const mat4< F32 > | prevProjectionMatrix | ||
) |
Definition at line 2025 of file GFXDevice.cpp.
Definition at line 2057 of file GFXDevice.cpp.
Definition at line 189 of file GFXDevice.inl.
void Divide::GFXDevice::setScreenMSAASampleCount | ( | U8 | sampleCount | ) |
Definition at line 1739 of file GFXDevice.cpp.
|
protected |
Definition at line 1749 of file GFXDevice.cpp.
void Divide::GFXDevice::setShadowMSAASampleCount | ( | ShadowType | type, |
U8 | sampleCount | ||
) |
Definition at line 1744 of file GFXDevice.cpp.
|
protected |
Definition at line 1761 of file GFXDevice.cpp.
Returns true if the viewport was changed.
Definition at line 2051 of file GFXDevice.cpp.
Definition at line 184 of file GFXDevice.inl.
|
noexcept |
Definition at line 3113 of file GFXDevice.cpp.
|
noexcept |
Definition at line 3107 of file GFXDevice.cpp.
|
privatenoexcept |
Definition at line 2006 of file GFXDevice.cpp.
void Divide::GFXDevice::toggleDebugGroup | ( | I16 | groupID, |
bool | state | ||
) |
Definition at line 2792 of file GFXDevice.cpp.
void Divide::GFXDevice::toggleDebugView | ( | I16 | index, |
bool | state | ||
) |
Definition at line 2779 of file GFXDevice.cpp.
Definition at line 1331 of file GFXDevice.cpp.
void Divide::GFXDevice::updateSceneDescriptorSet | ( | GFX::CommandBuffer & | bufferInOut, |
GFX::MemoryBarrierCommand & | memCmdInOut | ||
) | const |
Definition at line 525 of file GFXDevice.cpp.
|
private |
Upload draw related data to the GPU (view & projection matrices, viewport settings, etc)
Definition at line 1864 of file GFXDevice.cpp.
void Divide::GFXDevice::validateAndUploadDescriptorSets | ( | ) |
Definition at line 2090 of file GFXDevice.cpp.
Definition at line 2018 of file GFXDevice.cpp.
|
friend |
Definition at line 216 of file GFXDevice.h.
|
friend |
Definition at line 219 of file GFXDevice.h.
|
friend |
Definition at line 218 of file GFXDevice.h.
|
friend |
Definition at line 217 of file GFXDevice.h.
|
friend |
Definition at line 223 of file GFXDevice.h.
|
friend |
Definition at line 220 of file GFXDevice.h.
|
friend |
Definition at line 221 of file GFXDevice.h.
|
friend |
Definition at line 222 of file GFXDevice.h.
|
friend |
Definition at line 437 of file GFXDevice.h.
|
friend |
Definition at line 438 of file GFXDevice.h.
|
friend |
Definition at line 433 of file GFXDevice.h.
|
private |
Definition at line 480 of file GFXDevice.h.
|
private |
Definition at line 468 of file GFXDevice.h.
|
private |
Definition at line 520 of file GFXDevice.h.
|
private |
Definition at line 519 of file GFXDevice.h.
|
private |
Definition at line 505 of file GFXDevice.h.
|
private |
Definition at line 504 of file GFXDevice.h.
|
private |
Definition at line 522 of file GFXDevice.h.
|
private |
Definition at line 521 of file GFXDevice.h.
|
private |
Definition at line 507 of file GFXDevice.h.
|
private |
Definition at line 506 of file GFXDevice.h.
|
private |
Definition at line 567 of file GFXDevice.h.
|
private |
Definition at line 565 of file GFXDevice.h.
|
private |
The interpolation factor between the current and the last frame.
Definition at line 493 of file GFXDevice.h.
|
private |
Definition at line 474 of file GFXDevice.h.
|
private |
Definition at line 477 of file GFXDevice.h.
|
private |
Definition at line 478 of file GFXDevice.h.
|
private |
Definition at line 512 of file GFXDevice.h.
|
private |
Definition at line 514 of file GFXDevice.h.
|
private |
Definition at line 515 of file GFXDevice.h.
|
private |
Definition at line 513 of file GFXDevice.h.
|
private |
Definition at line 473 of file GFXDevice.h.
|
private |
Definition at line 475 of file GFXDevice.h.
|
private |
Definition at line 476 of file GFXDevice.h.
|
mutableprivate |
Definition at line 531 of file GFXDevice.h.
|
private |
Definition at line 532 of file GFXDevice.h.
|
private |
The default render state but with depth testing disabled.
Definition at line 488 of file GFXDevice.h.
|
private |
Definition at line 503 of file GFXDevice.h.
|
private |
Definition at line 524 of file GFXDevice.h.
|
private |
Definition at line 502 of file GFXDevice.h.
|
private |
Definition at line 518 of file GFXDevice.h.
|
private |
Definition at line 517 of file GFXDevice.h.
|
private |
Definition at line 516 of file GFXDevice.h.
|
private |
|
private |
Definition at line 529 of file GFXDevice.h.
|
private |
Definition at line 526 of file GFXDevice.h.
|
private |
Definition at line 525 of file GFXDevice.h.
|
private |
Definition at line 500 of file GFXDevice.h.
|
private |
Definition at line 511 of file GFXDevice.h.
|
private |
Definition at line 501 of file GFXDevice.h.
|
private |
Definition at line 510 of file GFXDevice.h.
|
private |
Definition at line 570 of file GFXDevice.h.
|
private |
Definition at line 572 of file GFXDevice.h.
Definition at line 562 of file GFXDevice.h.
|
private |
Definition at line 561 of file GFXDevice.h.
|
private |
shader used to preview the depth buffer
Definition at line 496 of file GFXDevice.h.
|
private |
Definition at line 497 of file GFXDevice.h.
|
private |
Definition at line 498 of file GFXDevice.h.
|
private |
Definition at line 534 of file GFXDevice.h.
|
private |
Definition at line 485 of file GFXDevice.h.
|
private |
Definition at line 486 of file GFXDevice.h.
|
private |
Definition at line 469 of file GFXDevice.h.
Definition at line 528 of file GFXDevice.h.
|
private |
Definition at line 499 of file GFXDevice.h.
|
private |
Definition at line 482 of file GFXDevice.h.
|
private |
Definition at line 471 of file GFXDevice.h.
|
private |
Special render state for 2D rendering.
Definition at line 490 of file GFXDevice.h.
|
private |
Definition at line 491 of file GFXDevice.h.
Definition at line 569 of file GFXDevice.h.
|
staticconstexprprivate |
Definition at line 564 of file GFXDevice.h.
|
staticprivate |
Definition at line 580 of file GFXDevice.h.
|
staticprivate |
Definition at line 578 of file GFXDevice.h.
|
staticprivate |
Definition at line 575 of file GFXDevice.h.
|
staticprivate |
Definition at line 577 of file GFXDevice.h.
|
staticconstexprprivate |
Definition at line 484 of file GFXDevice.h.