nCine::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::RHI::Texture), so each backend only has to provide the same set of names with the same surface.

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_function block.
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 EffectContext facilities 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 TileMap::AppendTileQuad contract)

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 + submit_quad() only

NeedsTexelStep

Calls texel_size() / has_texel_size() (the texel-step conversion)

NeedsUniforms

Calls has_uniform() / uniform_vec2/vec4() (resolved-uniform plumbing)

NeedsStripBuilder

Calls strip_*() / submit_strip[_shaded]() (the strip-builder scratch and its state)

NeedsQuadAxes

Calls quad_origin() / quad_axis_x/y() (pre-clip quad geometry)

Typedef documentation