|
RavEngine
|
Classes | |
| struct | CullingUBO |
| struct | CullingUBOinstance |
| struct | DebugUBO |
| struct | GTAOUBO |
| struct | GUIUBO |
| struct | JointInfluence |
| struct | KillParticleUBO |
| struct | LightToFBUBO |
| struct | navDebugUBO |
| struct | ParticleCreationPushConstants |
| struct | scissor |
| struct | SkinningPrepareUBO |
| struct | SkinningUBO |
| struct | SSAOUBO |
| struct | SSGIUBO |
| struct | vs |
Public Types | |
| enum class | AOMethod : uint8_t { SSAO , GTAO } |
Public Member Functions | |
| auto | GetDefaultPostEffectVSH () const |
| RenderEngine (const AppConfig &, RGLDevicePtr device) | |
| RenderTargetCollection | CreateRenderTargetCollection (dim size, bool createDepth=true) |
| void | ResizeRenderTargetCollection (RenderTargetCollection &collection, dim size) |
| RGLCommandBufferPtr | Draw (Ref< RavEngine::World >, const std::span< RenderViewCollection > screenTargets, float guiScaleFactor) |
| void | SyncVideoSettings () |
| double | GetElapsedTime () override |
| void | SetMouseCursor (const Rml::String &cursor_name) override |
| void | SetClipboardText (const Rml::String &text) override |
| void | GetClipboardText (Rml::String &text) override |
| void | RenderGeometry (Rml::Vertex *vertices, int num_vertices, int *indices, int num_indices, Rml::TextureHandle texture, const Rml::Vector2f &translation) override |
| Called by RmlUi when it wants to render geometry that it does not wish to optimise. | |
| Rml::CompiledGeometryHandle | CompileGeometry (Rml::Vertex *vertices, int num_vertices, int *indices, int num_indices, Rml::TextureHandle texture) override |
| Called by RmlUi when it wants to compile geometry it believes will be static for the forseeable future. | |
| void | RenderCompiledGeometry (Rml::CompiledGeometryHandle geometry, const Rml::Vector2f &translation) override |
| Called by RmlUi when it wants to render application-compiled geometry. | |
| void | ReleaseCompiledGeometry (Rml::CompiledGeometryHandle geometry) override |
| Called by RmlUi when it wants to release application-compiled geometry. | |
| void | EnableScissorRegion (bool enable) override |
| Called by RmlUi when it wants to enable or disable scissoring to clip content. | |
| void | SetScissorRegion (int x, int y, int width, int height) override |
| Called by RmlUi when it wants to change the scissor region. | |
| bool | LoadTexture (Rml::TextureHandle &texture_handle, Rml::Vector2i &texture_dimensions, const Rml::String &source) override |
| Called by RmlUi when a texture is required by the library. | |
| bool | GenerateTexture (Rml::TextureHandle &texture_handle, const Rml::byte *source, const Rml::Vector2i &source_dimensions) override |
| Called by RmlUi when a texture is required to be built from an internally-generated sequence of pixels. | |
| void | ReleaseTexture (Rml::TextureHandle texture_handle) override |
| Called by RmlUi when a loaded texture is no longer required. | |
| void | SetTransform (const Rml::Matrix4f *transform) override |
| Called by RmlUi when it wants to set the current transform matrix to a new matrix. | |
| bool | LogMessage (Rml::Log::Type type, const Rml::String &message) override |
| void | InitDebugger () const |
| void | DeactivateDebugger () const |
| void | depthMask (bool state) final |
| void | texture (bool state) final |
| void | begin (duDebugDrawPrimitives prim, float size=1.0f) final |
| void | vertex (const float *pos, unsigned int color) final |
| void | vertex (const float x, const float y, const float z, unsigned int color) final |
| void | vertex (const float *pos, unsigned int color, const float *uv) final |
| void | vertex (const float x, const float y, const float z, unsigned int color, const float u, const float v) final |
| void | end () final |
| End drawing primitives. | |
| void | DebugRender (const Im3d::DrawList &) |
| size_t | GetCurrentVRAMUse () |
| size_t | GetTotalVRAM () |
| MeshRange | AllocateMesh (const MeshPartView &mesh) |
| void | DeallocateMesh (const MeshRange &range) |
Public Member Functions inherited from duDebugDraw | |
| virtual unsigned int | areaToCol (unsigned int area) |
| Compute a color for given area. | |
Static Public Member Functions | |
| static const std::string_view | GetCurrentBackendName () |
Public Attributes | |
| struct RavEngine::RenderEngine::navDebugUBO | currentNavState |
| ConcurrentQueue< RGLBufferPtr > | gcBuffers |
| ConcurrentQueue< RGLTexturePtr > | gcTextures |
| ConcurrentQueue< RGLPipelineLayoutPtr > | gcPipelineLayout |
| ConcurrentQueue< RGLRenderPipelinePtr > | gcRenderPipeline |
Static Public Attributes | |
| static constexpr RGL::TextureFormat | depthPyramidFormat = RGL::TextureFormat::R32_Float |
| static constexpr uint32_t | maxssgimips = 5 |
| static constexpr RGL::TextureFormat | colorTexFormat = RGL::TextureFormat::RGBA16_Sfloat |
| static constexpr RGL::TextureFormat | radianceFormat = RGL::TextureFormat::RGBA16_Sfloat |
| static constexpr RGL::TextureFormat | albedoFormat = RGL::TextureFormat::RGBA16_Sfloat |
| static constexpr RGL::TextureFormat | viewSpaceNormalTextureFormat = RGL::TextureFormat::RGBA16_Sfloat |
| static constexpr RGL::TextureFormat | ssgiOutputFormat = RGL::TextureFormat::RGBA16_Sfloat |
| static constexpr RGL::TextureFormat | ssaoOutputFormat = RGL::TextureFormat::R16_Float |
| static constexpr RGL::TextureFormat | depthFormat = RGL::TextureFormat::D32SFloat |
| static struct RavEngine::RenderEngine::vs | VideoSettings |
| static std::optional< GUIComponent > | debuggerContext |
| static std::unique_ptr< InputManager > | debuggerInput |
Protected Member Functions | |
| matrix4 | make_gui_matrix (Rml::Vector2f translation) |
| uint32_t | WriteTransient (RGL::untyped_span data) |
| void | ReallocateVertexAllocationToSize (uint32_t newSize) |
| void | ReallocateIndexAllocationToSize (uint32_t newSize) |
| void | ReallocateGeneric (RGLBufferPtr &reallocBuffer, uint32_t &reallocBufferSize, uint32_t newSize, allocation_allocatedlist_t &allocatedList, allocation_freelist_t &freelist, uint32_t stride, RGL::BufferConfig::Type bufferType, decltype(frameCount)&lastResizeFrame, const char *debugName=nullptr) |
| void | DestroyUnusedResources () |
Protected Attributes | |
| dim_t< int > | currentRenderSize |
| RGLBufferPtr | transientBuffer |
| RGLBufferPtr | transientStagingBuffer |
| uint32_t | transientOffset = 0 |
| allocation_freelist_t | vertexFreeList { 1, Range{.start = 0, .count = initialVerts}} |
| allocation_freelist_t | indexFreeList { 1, Range{.start = 0, .count = initialIndices}} |
| allocation_allocatedlist_t | vertexAllocatedList |
| allocation_allocatedlist_t | indexAllocatedList |
| uint32_t | currentVertexSize = initialVerts |
| uint32_t | currentIndexSize = initialIndices |
| SpinLock | allocationLock |
| bool | navDebugDepthEnabled = false |
| matrix4 | currentGUIMatrix |
| struct RavEngine::RenderEngine::scissor | RMLScissor |
Static Protected Attributes | |
| static constexpr uint32_t | transientSizeBytes = 65536 |
| static RavEngine::Vector< VertexColorUV > | navMeshPolygon |
| static Ref< GUIMaterialInstance > | guiMaterial |
Friends | |
| class | App |
| class | Material |
Construct a render engine instance
| w | the owning world for this engine instance |
| MeshRange RavEngine::RenderEngine::AllocateMesh | ( | const MeshPartView & | mesh | ) |
Find a Range that can fit the current allocation. If one does not exist, returns -1 (aka uint max)
Given a byte size, find a possible block, resizing the underlying memory if necessary.
|
finalvirtual |
Size here is not the number of primitives, it's the pixel size of the primitive, for line and point primitives
Implements duDebugDraw.
|
finalvirtual |
Implements duDebugDraw.
| RGLCommandBufferPtr RavEngine::RenderEngine::Draw | ( | Ref< RavEngine::World > | worldOwning, |
| const std::span< RenderViewCollection > | screenTargets, | ||
| float | guiScaleFactor | ||
| ) |
Render one frame using the current state of every object in the world
|
finalvirtual |
End drawing primitives.
Implements duDebugDraw.
|
static |
|
finalvirtual |
Implements duDebugDraw.
Submit a vertex
| pos | [in] position of the verts. |
| color | [in] color of the verts. |
Implements duDebugDraw.
Submit a vertex
| pos | [in] position of the verts. |
| color | [in] color of the verts. |
Implements duDebugDraw.
|
finalvirtual |
Submit a vertex
| x,y,z | [in] position of the verts. |
| color | [in] color of the verts. |
Implements duDebugDraw.
|
finalvirtual |
Submit a vertex
| x,y,z | [in] position of the verts. |
| color | [in] color of the verts. |
Implements duDebugDraw.
|
protected |
Add data to the transient buffer. The transient buffer is reset every frame.