nCine::RenderResources class

Creates and holds the OpenGL rendering resources shared by the whole application.

Owns the global singletons of the render pipeline (binary shader cache, buffers manager, VAO pool, render command pool, batcher), the built-in default shader programs and the default camera. Lifetime is driven by Application; it cannot be instantiated.

Public types

struct VertexFormatPos2
Vertex format for vertices with positions only.
struct VertexFormatPos2Tex2
Vertex format for vertices with positions and texture coordinates.
struct VertexFormatPos2Index
Vertex format for vertices with positions and draw indices.
struct VertexFormatPos2Tex2Index
Vertex format for vertices with positions, texture coordinates and draw indices.
struct CameraUniformData
Per-shader camera uniform data and the frames its matrices were last updated.

Public static functions

static auto GetBinaryShaderCache() -> BinaryShaderCache&
static auto GetBuffersManager() -> RenderBuffersManager&
static auto GetVaoPool() -> RenderVaoPool&
static auto GetRenderCommandPool() -> RenderCommandPool&
static auto GetRenderBatcher() -> RenderBatcher&
static auto GetShaderProgram(Material::ShaderProgramType shaderProgramType) -> GLShaderProgram*
static auto GetBatchedShader(const GLShaderProgram* shader) -> GLShaderProgram*
static auto RegisterBatchedShader(const GLShaderProgram* shader, GLShaderProgram* batchedShader) -> bool
static auto UnregisterBatchedShader(const GLShaderProgram* shader) -> bool
static auto GetCameraUniformsBuffer() -> std::uint8_t*
static auto FindCameraUniformData(GLShaderProgram* shaderProgram) -> CameraUniformData*
static void InsertCameraUniformData(GLShaderProgram* shaderProgram, CameraUniformData&& cameraUniformData)
static auto RemoveCameraUniformData(GLShaderProgram* shaderProgram) -> bool
static auto GetCurrentCamera() -> const Camera*
static auto GetCurrentViewport() -> const Viewport*
static void SetDefaultAttributesParameters(GLShaderProgram& shaderProgram)

Constructors, destructors, conversion operators

RenderResources() deleted
~RenderResources() deleted