GraphicCore¶
Graphic core interface.
Overview¶
Typical use cases:
Providing Vulkan-specific core graphics functionality and resource management
Header¶
<RaeptorCogs/GAPI/Vulkan/Core/Internal/GraphicCore.hpp>
Metadata¶
- Author
Estorc
- Version
v1.0
- Copyright
Copyright (c) 2025 Estorc MIT License.
Classes¶
Class |
Description |
|---|---|
|
No description. |
-
class GraphicCore : public RaeptorCogs::GAPI::Common::GraphicCore¶
Public Functions
-
inline GraphicCore(Common::RendererBackend &renderer)¶
Constructor for GraphicCore.
Initializes the GraphicCore with a reference to the renderer backend.
- Parameters:
renderer – Reference to the renderer backend.
-
void createRenderPass(VkFormat swapchainImageFormat)¶
Create Vulkan render pass.
Note
Initializes the renderPass member.
- Parameters:
swapchainImageFormat – Format of the swapchain images.
-
inline VkPhysicalDevice &getPhysicalDevice()¶
Get the Vulkan physical device.
- Returns:
Vulkan physical device.
-
inline VkPipelineCache &getPipelineCache()¶
Get the Vulkan pipeline cache.
- Returns:
Vulkan pipeline cache.
-
inline VkCommandBuffer &getCommandBuffer()¶
Get the Vulkan command buffer.
- Returns:
Vulkan command buffer.
-
virtual void setViewport(int x, int y, int width, int height) override¶
See also
-
virtual void clearSwapchainBuffers() override¶
-
virtual void useBlend() override¶
See also
-
virtual void bindMaskTexture() override¶
See also
-
virtual void setTextureUniform(ObjectHandler<Common::Shader> shader) override¶
-
virtual void setMaskTextureUniform(ObjectHandler<Common::Shader> shader) override¶
-
virtual void drawElementsInstancedBaseVertexBaseInstance(size_t count, size_t instanceCount, size_t first, int baseVertex, unsigned int baseInstance) override¶
-
virtual void enableStencilGuarding() override¶
Private Members
-
VkRenderPass renderPass = VK_NULL_HANDLE¶
Vulkan render pass.
Defines the render pass configuration.
Note
Lazily initialized in createRenderPass().
-
inline GraphicCore(Common::RendererBackend &renderer)¶
Variables¶
-
int RaeptorCogs::GAPI::Vulkan::DEFAULT_DYNAMIC_DATA_BUFFER_SIZE = (MAX_SPRITES * INSTANCE_SIZE)¶
Default size of the dynamic instance data buffer.
-
int RaeptorCogs::GAPI::Vulkan::INSTANCE_SIZE = 32¶
Width of the instance data texture.
-
int RaeptorCogs::GAPI::Vulkan::MAX_SPRITES = 8000000¶
Maximum number of sprites supported.
-
int RaeptorCogs::GAPI::Vulkan::STATIC_INSTANCE_DATA_SIZE = (MAX_SPRITES * sizeof(Common::StaticInstanceData))¶
Size of the static instance data buffer.