RHI namespace
Render Hardware Interface — compile-time-selectable graphics backend abstraction.
Exactly one backend is compiled into a binary, selected by a WITH_RHI_* macro (the OpenGL family is the default). The render pipeline refers only to the backend-neutral aliases declared here (e.g. nCine::RHI::Device, nCine::
Namespaces
- namespace D3D11
- Direct3D 11 backend, selected by
WITH_RHI_D3D11. - namespace GL
- OpenGL 3.3 core, OpenGL|ES 3.0/2.0 and WebGL 2.0 backend, selected by
WITH_RHI_GL. - namespace GU
- namespace GX
- namespace GXM
- namespace PVR
- namespace Software
- CPU software rasterizer backend, selected by
WITH_RHI_SOFTWARE. - namespace Vulkan
- Vulkan backend, selected by
WITH_RHI_VULKAN.
Classes
- struct BufferRange
- Locates a sub-range within a buffer object, together with its mapped memory.
- struct FixedFunctionPass
- One pass of a fixed-function effect, as described by a shader's
fixed_functionblock. - class IRhiCapabilities
- Interface to query the runtime capabilities of the selected RHI backend.
- class RhiCapabilitiesBase
- Backend-independent part of the RHI capabilities.
Enums
-
enum class FixedFunctionIntrinsic : std::
uint8_t { None, TileMapMesh, LightingCombine, LineStripMesh } - Backend pipeline stage a shader binds itself to with a
pipeline <name>;fixed_function block. -
enum class FixedFunctionRequirements : std::
uint8_t { None = 0, NeedsTexelStep = 0x01, NeedsUniforms = 0x02, NeedsStripBuilder = 0x04, NeedsQuadAxes = 0x08 } - Optional
EffectContextfacilities a generated effect function can ever call, as single-bit flags.
Typedefs
-
using Device = RHI::
GL:: GLDevice -
using Texture = RHI::
GL:: GLTexture -
using Buffer = RHI::
GL:: GLBufferObject -
using Shader = RHI::
GL:: GLShader -
using ShaderProgram = RHI::
GL:: GLShaderProgram -
using ShaderUniforms = RHI::
GL:: GLShaderUniforms -
using ShaderUniformBlocks = RHI::
GL:: GLShaderUniformBlocks -
using Uniform = RHI::
GL:: GLUniform -
using UniformBlock = RHI::
GL:: GLUniformBlock -
using UniformCache = RHI::
GL:: GLUniformCache -
using UniformBlockCache = RHI::
GL:: GLUniformBlockCache -
using Attribute = RHI::
GL:: GLAttribute -
using Framebuffer = RHI::
GL:: GLFramebuffer -
using Renderbuffer = RHI::
GL:: GLRenderbuffer -
using RenderTarget = RHI::
GL:: GLRenderTarget -
using VertexArray = RHI::
GL:: GLVertexArrayObject -
using VertexFormat = RHI::
GL:: GLVertexFormat -
using Capabilities = RHI::
GL:: GLRhiCapabilities -
using Debug = RHI::
GL:: GLDebug
Enum documentation
enum class nCine:: RHI:: FixedFunctionIntrinsic : std:: uint8_t
Backend pipeline stage a shader binds itself to with a pipeline <name>; fixed_function block.
A few programs do not describe shading at all - they feed engine data structures (the tile-layer vertex stream, the weapon-wheel line strip) or hook a compositor stage (the CPU-lightmap lighting) whose implementation is backend mechanism, not effect policy. Their shader files still declare WHICH stage they are (so no shader name ever has to be matched in a backend), and the generated tables carry that declaration here instead of a transpiled function. The geometry-synthesized quad effects (the transition iris, the warped background) are NOT intrinsics anymore - since migration phase 4 they are ordinary transpiled blocks built on the strip-builder half of the contract below.
| Enumerators | |
|---|---|
| None |
Not an intrinsic - the entry carries a transpiled effect function instead |
| TileMapMesh |
A whole tile layer as one triangle-list mesh (8-float |
| LightingCombine |
The viewport compositor - the direct-tier CPU-lightmap lighting hook |
| LineStripMesh |
Vertex-fed textured line strip (the weapon wheel) |
enum class nCine:: RHI:: FixedFunctionRequirements : std:: uint8_t
Optional EffectContext facilities a generated effect function can ever call, as single-bit flags.
Computed statically by the fixed-function transpiler while it emits the function (a bit is set exactly when the corresponding builtin family appears in the emitted code) and carried in each generated table entry, so a backend's Dispatch can skip the per-draw/per-instance EffectContext setup that only feeds a facility the effect can never touch. This is purely a setup-skipping contract: because the flags come from the same static analysis that emitted the function's calls, gating setup on them can never change what the function submits.
| Enumerators | |
|---|---|
| None |
The portable minimum: instance colour + |
| NeedsTexelStep |
Calls |
| NeedsUniforms |
Calls |
| NeedsStripBuilder |
Calls |
| NeedsQuadAxes |
Calls |
Typedef documentation
using nCine:: RHI:: Device = RHI:: GL:: GLDevice
#include <nCine/Graphics/RHI/RhiFwd.h>
using nCine:: RHI:: Texture = RHI:: GL:: GLTexture
#include <nCine/Graphics/RHI/RhiFwd.h>
using nCine:: RHI:: Buffer = RHI:: GL:: GLBufferObject
#include <nCine/Graphics/RHI/RhiFwd.h>
using nCine:: RHI:: Shader = RHI:: GL:: GLShader
#include <nCine/Graphics/RHI/RhiFwd.h>
using nCine:: RHI:: ShaderProgram = RHI:: GL:: GLShaderProgram
#include <nCine/Graphics/RHI/RhiFwd.h>
using nCine:: RHI:: ShaderUniforms = RHI:: GL:: GLShaderUniforms
#include <nCine/Graphics/RHI/RhiFwd.h>
using nCine:: RHI:: ShaderUniformBlocks = RHI:: GL:: GLShaderUniformBlocks
#include <nCine/Graphics/RHI/RhiFwd.h>
using nCine:: RHI:: Uniform = RHI:: GL:: GLUniform
#include <nCine/Graphics/RHI/RhiFwd.h>
using nCine:: RHI:: UniformBlock = RHI:: GL:: GLUniformBlock
#include <nCine/Graphics/RHI/RhiFwd.h>
using nCine:: RHI:: UniformCache = RHI:: GL:: GLUniformCache
#include <nCine/Graphics/RHI/RhiFwd.h>
using nCine:: RHI:: UniformBlockCache = RHI:: GL:: GLUniformBlockCache
#include <nCine/Graphics/RHI/RhiFwd.h>
using nCine:: RHI:: Attribute = RHI:: GL:: GLAttribute
#include <nCine/Graphics/RHI/RhiFwd.h>
using nCine:: RHI:: Framebuffer = RHI:: GL:: GLFramebuffer
#include <nCine/Graphics/RHI/RhiFwd.h>
using nCine:: RHI:: Renderbuffer = RHI:: GL:: GLRenderbuffer
#include <nCine/Graphics/RHI/RhiFwd.h>
using nCine:: RHI:: RenderTarget = RHI:: GL:: GLRenderTarget
#include <nCine/Graphics/RHI/RhiFwd.h>
using nCine:: RHI:: VertexArray = RHI:: GL:: GLVertexArrayObject
#include <nCine/Graphics/RHI/RhiFwd.h>
using nCine:: RHI:: VertexFormat = RHI:: GL:: GLVertexFormat
#include <nCine/Graphics/RHI/RhiFwd.h>
using nCine:: RHI:: Capabilities = RHI:: GL:: GLRhiCapabilities
#include <nCine/Graphics/RHI/RhiFwd.h>
using nCine:: RHI:: Debug = RHI:: GL:: GLDebug
#include <nCine/Graphics/RHI/RhiFwd.h>