GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::graphics Namespace Reference

Classes

struct  UniformBufferLayoutReference
 Type-erased read-only reference to a UniformBufferLayout. More...
struct  StorageBufferLayoutReference
 Type-erased read-only reference to a StorageBufferLayout. More...
struct  BufferSetLayoutReference
 Type-erased read-only reference to a BufferSetLayout. More...
struct  BufferLayoutReference
 Generic type-erased read-only reference to a buffer or buffer set layout. More...
struct  UniformBufferLayout
 Layout description of a UniformBuffer. More...
struct  StorageBufferLayout
 Layout description of a StorageBuffer. More...
struct  BufferSetLayout
 Layout description of a BufferSet. More...
class  UniformBuffer
 GPU memory buffer containing a fixed-size struct of uniform parameters to be read by a shader program. More...
class  StorageBuffer
 GPU memory buffer containing an array of structs to be read by a shader program. More...
class  BufferSet
 Collection of GPU memory buffers to be read by a shader. More...
class  InstanceBuffer
 Resource handle with shared ownership of a GPU memory buffer with copy-on-write value semantics containing an array of structs to be used as instances when drawing meshes to a RenderPass. More...
class  DrawCommandBuffer
 Resource handle with shared ownership of a GPU memory buffer with copy-on-write value semantics containing an array of draw commands to be used when drawing meshes to a RenderPass. More...
class  DrawCommandBuffer< graphics::Mesh< Vertex, Index, Parameters, Instance > >
class  UnorderedDrawCommandBuffer
 Resource handle with shared ownership of a GPU memory buffer with copy-on-write value semantics containing an unordered set of draw commands to be used when drawing meshes to a RenderPass. More...
class  UnorderedDrawCommandBuffer< graphics::Mesh< Vertex, Index, Parameters, Instance > >
struct  ConstantDescription
 Description of a constant in a shader constant struct. More...
struct  DeviceOptions
 Configuration options for a Device. More...
class  Device
 Persistent system managing the rendering context of a Window. More...
class  DisplayMode
 Information about a specific display mode available to a Display. More...
class  Display
 Information about a display on the host system. More...
struct  Error
 Exception type for domain-specific errors originating from the grem::graphics module. More...
struct  FeatureSupport
 Declarations of special features supported by a Device. More...
struct  FieldDescription
 Description of a field in a field struct for a shader-read buffer. More...
struct  NoIndex
 Tag type for specifying that a Mesh does not have an index buffer. More...
struct  NoParameters
 Tag type for specifying that a Mesh does not have any parameters. More...
struct  NoInstance
 Tag type for specifying that a Mesh does not have any instance attributes. More...
class  Mesh
 Generic abstraction of a GPU vertex array object and its associated buffers. More...
struct  sampler2D
 Reference to a sampler2D Texture that may be used as a parameter value type in a shader-read buffer. More...
struct  sampler2DShadow
 Reference to a sampler2DShadow Texture that may be used as a parameter value type in a shader-read buffer. More...
struct  sampler2DArray
 Reference to a sampler2DArray Texture that may be used as a parameter value type in a shader-read buffer. More...
struct  sampler2DArrayShadow
 Reference to a sampler2DArrayShadow Texture that may be used as a parameter value type in a shader-read buffer. More...
struct  samplerCube
 Reference to a samplerCube Texture that may be used as a parameter value type in a shader-read buffer. More...
struct  samplerCubeShadow
 Reference to a samplerCubeShadow Texture that may be used as a parameter value type in a shader-read buffer. More...
struct  samplerCubeArray
 Reference to a samplerCubeArray Texture that may be used as a parameter value type in a shader-read buffer. More...
struct  samplerCubeArrayShadow
 Reference to a samplerCubeArrayShadow Texture that may be used as a parameter value type in a shader-read buffer. More...
struct  ParameterDescription
 Description of a parameter in a parameter struct for a shader-read buffer. More...
class  RenderPass
 Backend-specific implementation of RenderPass. More...
struct  BlendState
 Blend state used in a ShaderPipelineOptions. More...
struct  ShaderPipelineOptions
 Configuration of a graphics pipeline. More...
struct  ShaderCompilationOptions
 Options for compiling shader code. More...
struct  VertexShaderOptions
 Configuration options for loading a VertexShader. More...
struct  FragmentShaderOptions
 Configuration options for loading a FragmentShader. More...
class  VertexShader
 Compiled GPU vertex shader stage. More...
class  VertexShader< graphics::Mesh< Vertex, Index, Parameters, Instance >, Constants, Outputs, Buffers... >
class  FragmentShader
 Compiled GPU fragment shader stage. More...
class  FragmentShader< graphics::Mesh< Vertex, Index, Parameters, Instance >, Inputs, Constants, Outputs, Buffers... >
class  ShaderPipeline
 Linked GPU shader pipeline. More...
struct  SpriteOptions
 Configuration options for a sprite in a SpriteAtlas. More...
struct  SpriteAtlasOptions
 Configuration options for a SpriteAtlas. More...
struct  SpriteID
 Identifier for a specific image in a SpriteAtlas. More...
class  SpriteAtlas
 Expandable texture atlas for packing 2D images into a spritesheet to enable batch rendering. More...
struct  SwapchainOptions
 Configuration options for a Swapchain. More...
class  Swapchain
 Render target texture holding a chain of images leading to a window to be presented to. More...
class  TextureAspects
 Set of aspects of a texture format. More...
struct  TextureSubresource
 Subresource selection of a texture. More...
struct  TextureRegion2D
 Two-dimensional region of a texture. More...
struct  TextureRegion3D
 Three-dimensional region of a texture. More...
struct  TextureSubresourceReference
 Reference to a subresource of a texture. More...
struct  TextureSubresourceConstReference
 Read-only reference to a subresource of a texture. More...
struct  TextureRegion2DReference
 Reference to a 2D region of a texture. More...
struct  TextureRegion2DConstReference
 Read-only reference to a 2D region of a texture. More...
struct  TextureRegion3DReference
 Reference to a 3D region of a texture. More...
struct  TextureRegion3DConstReference
 Read-only reference to a 3D region of a texture. More...
struct  RetainValues
 Specification that a texture should leave its values untouched rather than clearing them. More...
struct  ClearValues
 Specification of values that a texture should be cleared to. More...
struct  UndefinedClearValues
 Specification that a texture may be cleared to undefined values. More...
struct  ClearMode
 Specification of how a texture should either be left untouched, be cleared to specific values or be cleared to undefined values before being used. More...
struct  StoreIntermediateValues
 Specification that an intermediate render texture should store its intermediate values after being resolved. More...
struct  DiscardIntermediateValues
 Specification that an intermediate render texture may have its intermediate values discarded after being resolved. More...
struct  ResolveMode
 Specification of how an intermediate render texture should either store or discard its values after being resolved. More...
struct  TextureImageUploadOptions
 Configuration options for a texture image upload. More...
struct  TextureImageDownloadOptions
 Configuration options for a texture image download. More...
struct  TextureSamplerOptions
 Configuration options for the sampler of a Texture. More...
class  Texture
 Storage for multidimensional data, such as 2D images, on the GPU, combined with a sampler configuration that defines how to sample the stored data in shaders while rendering. More...
struct  VertexAttributeDescription
 Description of a vertex attribute in a vertex atttribute struct. More...
class  Viewport
 Region of a render target. More...
struct  WindowOptions
 Configuration options for a Window. More...
class  Window
 Graphical window that can be rendered to. More...
struct  OrthographicProjection2D
 Configuration of an orthographic projection in 2D. More...
struct  Projection2D
 Projection matrix or configuration of a projection in 2D. More...
struct  WorldView2D
 Configuration of a world-space view in 2D. More...
struct  View2D
 View matrix or configuration of a view in 2D. More...
struct  Camera2DOptions
 Configuration options for a Camera2D. More...
class  Camera2D
 Combined view-projection matrix, defining a 2D perspective to render from. More...
struct  Font2DOptions
 Configuration options for a Font2D. More...
class  Font2D
 Typeface describing an assortment of character glyphs that may be rendered on-demand into an expanding texture atlas, for use in Text2D rendering. More...
struct  ModelInstance2D
 Configuration of a Model2D instance to draw. More...
struct  TriangleInstance2D
 Configuration of an arbitrarily transformed 2D triangle instance, optionally textured, to draw. More...
struct  QuadInstance2D
 Configuration of an arbitrarily transformed 2D quadrilateral instance, optionally textured, to draw. More...
struct  RectangleInstance2D
 Configuration of a 2D rectangle instance, optionally textured, to draw. More...
struct  ImageInstance2D
 Configuration of a 2D image instance to draw. More...
struct  SpriteInstance2D
 Configuration of a 2D sprite instance from a SpriteAtlas to draw. More...
struct  TextInstance2D
 Configuration of a 2D instance of Text2D shaped from a Font2D to draw. More...
struct  TextStringInstance2D
 Configuration of a 2D instance of a string of text to draw using a Font2D. More...
class  Instances2D
 Batch of instances to be drawn in a Renderer2D frame. More...
struct  Instances2DFilter
 Filter parameters that determine which instances in a 2D batch to draw. More...
struct  Instances2DView
 View over a batch of instances to be drawn in a Renderer2D frame. More...
class  Model2D
 Container for a set of 2D triangle strip meshes stored on the GPU. More...
struct  Renderer2DOptions
 Configuration options for a Renderer2D. More...
class  Renderer2D
 Persistent system that provides 2D rendering capabilities. More...
struct  TextAlign
 Text alignment mode. More...
class  Text2D
 Facility for shaping text, according to a Font2D, into renderable glyphs. More...
struct  OrthographicProjection3D
 Configuration of an orthographic projection in 3D. More...
struct  PerspectiveProjection3D
 Configuration of a perspective projection in 3D. More...
struct  Projection3D
 Projection matrix or configuration of a projection in 3D. More...
struct  WorldView3D
 Configuration of a world-space view in 3D. More...
struct  View3D
 View matrix or configuration of a view in 3D. More...
struct  Camera3DOptions
 Configuration options for a Camera3D. More...
class  Camera3D
 Combined view-projection matrix, defining a 3D perspective to render from. More...
class  Cubemap3D
 Container for a cubemap mesh stored on the GPU. More...
struct  DecalMaterialID
 Opaque identifier for a specific decal material in a Decals3D set. More...
struct  DecalID
 Opaque handle to a specific decal in a Decals3D set. More...
struct  DecalMaterialOptions
 Configuration options for a decal material. More...
struct  DecalOptions3D
 Configuration options for a 3D decal. More...
struct  Decals3DOptions
 Configuration options for a Decals3D set. More...
class  Decals3D
 Set of decals in 3D space. More...
struct  Fog3DOptions
 Configuration options for a Fog3D. More...
class  Fog3D
 Distance-based fog in 3D space. More...
struct  ModelInstance3D
 Configuration of a Model3D instance to draw. More...
struct  FlatModelInstance3D
 Configuration of a flat Model2D instance to draw in 3D. More...
struct  TriangleInstance3D
 Configuration of an arbitrarily transformed 3D triangle instance, optionally textured, to draw. More...
struct  QuadInstance3D
 Configuration of a 3D quadrilateral instance, optionally textured, to draw. More...
struct  SpriteInstance3D
 Configuration of a 3D sprite instance from a SpriteAtlas to draw. More...
struct  TextInstance3D
 Configuration of a 3D instance of Text2D shaped from a Font2D to draw. More...
struct  TextStringInstance3D
 Configuration of a 3D instance of a string of text to draw using a Font2D. More...
class  Instances3D
 Batch of instances to be drawn in a Renderer3D frame. More...
struct  Instances3DFilter
 Filter parameters that determine which instances in a 3D batch to draw. More...
struct  Instances3DView
 View over a batch of instances to be drawn in a Renderer3D frame. More...
struct  LightBaker3DOptions
 Configuration options for a LightBaker3D. More...
class  LightBaker3D
 System for pre-baking global illumination. More...
struct  LightProbeVolumeOptions3D
 Configuration options for a light probe volume in a LightProbeVolumes3D set. More...
struct  LightProbeVolumes3DOptions
 Configuration options for a LightProbeVolumes3D set. More...
class  LightProbeVolumes3D
 Set of light probe volumes in 3D space. More...
struct  LightID
 Opaque handle to a specific light in a Lights3D set. More...
struct  AmbientLightOptions3D
 Configuration options for a 3D light source representing the ambient light in a scene, which adds an (unrealistic) constant amount of light to everything. More...
struct  SunLightOptions3D
 Configuration options for a 3D light source representing a directional light that is tied to the skybox and replaces its baked lighting on directly lit surfaces. More...
struct  DirectionalLightOptions3D
 Configuration options for a 3D light source representing a purely directional light with infinite range. More...
struct  PointLightOptions3D
 Configuration options for an infinitesimally small point light source, which can be used to approximate e.g. a light bulb. More...
struct  SpotLightOptions3D
 Configuration options for a point light source that is limited to a cone shape, which can be used to approximate e.g. a headlamp on a car. More...
struct  Lights3DOptions
 Configuration options for a Lights3D set. More...
class  Lights3D
 Set of direct light sources in 3D space. More...
struct  Model3DOptions
 Configuration options for a Model3D. More...
class  Model3D
 Container for a set of 3D triangle mesh nodes stored on the GPU. More...
struct  ReflectionProbeOptions3D
 Configuration options for a reflection probe in a ReflectionProbes3D set. More...
struct  ReflectionProbes3DOptions
 Configuration options for a ReflectionProbes3D set. More...
class  ReflectionProbes3D
 Set of reflection probes in 3D space. More...
struct  Renderer3DOptions
 Configuration options for a Renderer3D. More...
class  Renderer3D
 Persistent system that provides 3D rendering capabilities. More...
struct  Sky3DOptions
 Configuration options for a Sky3D. More...
class  Sky3D
 Skybox in 3D space. More...
struct  Sky3DFilter
 Filter parameters that determine which parts of a sky are drawn. More...
struct  Sky3DView
 View over a sky to be drawn in a Renderer3D frame. More...

Concepts

concept  constant_value_type
 Concept that checks if a type is a valid value type for a shader constant.
concept  shader_constant_struct
 Concept that checks if a type is a valid shader constant struct type.
concept  field_value_type
 Concept that checks if a type is a valid value type for a field of a shader-read buffer.
concept  field_struct
 Concept that checks if a type is a valid field struct type for a shader-read buffer.
concept  mesh_vertex
 Backend-specific implementation of Mesh.
concept  mesh_index
 Concept that checks if a type is a valid index type.
concept  mesh_parameters
 Concept that checks if a type is a valid mesh parameter struct type.
concept  mesh_instance
 Concept that checks if a type is a valid instance type.
concept  parameter_value_type
 Concept that checks if a type is a valid parameter value type for a shader-read buffer.
concept  parameter_struct
 Concept that checks if a type is a valid parameter struct type for a shader-read buffer.
concept  vertex_attribute_value_type
 Concept that checks if a type is a valid value type for a vertex attribute.
concept  vertex_attribute_struct
 Concept that checks if a type is a valid vertex attribute struct type.

Typedefs

using VertexAttributeMask = BitArray<32>
 Mask of active vertex attributes in a Mesh.

Enumerations

enum class  ConstantType : uint8_t { BOOL , INT , UINT , FLOAT }
 Specification of the underlying value type of a shader constant. More...
enum class  PresentationSubmissionID : uint64_t
 Backend-specific implementation of Device. More...
enum class  FieldType : uint8_t {
  INT , IVEC2 , IVEC3 , IVEC4 ,
  UINT , UVEC2 , UVEC3 , UVEC4 ,
  FLOAT , VEC2 , VEC3 , VEC4 ,
  MAT2 , MAT3 , MAT4
}
 Specification of the underlying value type of a field of a shader-read buffer. More...
enum class  MeshIndexType : uint8_t { U16 , U32 }
 Specification of which type of indices is used in the index buffer of a particular Mesh. More...
enum class  ParameterType : uint8_t {
  INT , IVEC2 , IVEC3 , IVEC4 ,
  UINT , UVEC2 , UVEC3 , UVEC4 ,
  FLOAT , VEC2 , VEC3 , VEC4 ,
  MAT2 , MAT3 , MAT4 , SAMPLER_2D ,
  SAMPLER_2D_SHADOW , SAMPLER_2D_ARRAY , SAMPLER_2D_ARRAY_SHADOW , SAMPLER_CUBE ,
  SAMPLER_CUBE_SHADOW , SAMPLER_CUBE_ARRAY , SAMPLER_CUBE_ARRAY_SHADOW
}
 Specification of the underlying value type of a parameter in a shader-read buffer. More...
enum class  DepthBufferMode : uint8_t { NONE , USE_DEPTH_TEST , USE_DEPTH_TEST_READ_ONLY }
 Backend-specific implementation of ShaderPipeline. More...
enum class  DepthTestPredicate : uint8_t {
  NEVER_PASS , LESS , LESS_OR_EQUAL , GREATER ,
  GREATER_OR_EQUAL , EQUAL , NOT_EQUAL , ALWAYS_PASS
}
 Depth test predicate used in a ShaderPipelineOptions. More...
enum class  StencilBufferMode : uint8_t { NONE , USE_STENCIL_TEST }
 Stencil buffer mode used in a ShaderPipelineOptions. More...
enum class  StencilTestPredicate : uint8_t {
  NEVER_PASS , LESS , LESS_OR_EQUAL , GREATER ,
  GREATER_OR_EQUAL , EQUAL , NOT_EQUAL , ALWAYS_PASS
}
 Stencil test predicate used in a ShaderPipelineOptions. More...
enum class  StencilBufferOperation : uint8_t {
  KEEP , SET_TO_ZERO , REPLACE , INCREMENT_AND_CLAMP ,
  INCREMENT_AND_WRAP , DECREMENT_AND_CLAMP , DECREMENT_AND_WRAP , BITWISE_INVERT
}
 Operation to perform after evaluating the stencil test in a ShaderPipelineOptions. More...
enum class  PrimitiveType : uint8_t {
  POINTS , LINES , LINE_STRIP , TRIANGLES ,
  TRIANGLE_STRIP
}
 Graphical primitive type formed by mesh vertices, used in a ShaderPipelineOptions. More...
enum class  PolygonMode : uint8_t { POINT , LINE , FILL }
 Polygon mode used in a ShaderPipelineOptions. More...
enum class  FaceCullingMode : uint8_t { NONE , CULL_BACK_FACES , CULL_FRONT_FACES , CULL_FRONT_AND_BACK_FACES }
 Face culling mode used in a ShaderPipelineOptions. More...
enum class  FrontFace : uint8_t { COUNTERCLOCKWISE , CLOCKWISE }
 Front face winding order used in a ShaderPipelineOptions. More...
enum class  BlendFactor : uint8_t {
  ZERO , ONE , SOURCE_COLOR , ONE_MINUS_SOURCE_COLOR ,
  DESTINATION_COLOR , ONE_MINUS_DESTINATION_COLOR , SOURCE_ALPHA , ONE_MINUS_SOURCE_ALPHA ,
  DESTINATION_ALPHA , ONE_MINUS_DESTINATION__ALPHA , CONSTANT_COLOR , ONE_MINUS_CONSTANT_COLOR ,
  CONSTANT_ALPHA , ONE_MINUS_CONSTANT_ALPHA , SOURCE_ALPHA_SATURATE
}
 Blend factor used in the BlendState of a ShaderPipelineOptions. More...
enum class  BlendOperation : uint8_t {
  ADD , SUBTRACT , REVERSE_SUBTRACT , MIN ,
  MAX
}
 Blend operation used in the BlendState of a ShaderPipelineOptions. More...
enum class  TextureType : uint8_t {
  EMPTY , TEXTURE_2D , TEXTURE_2D_ARRAY , TEXTURE_CUBE ,
  TEXTURE_CUBE_ARRAY , RENDERBUFFER , SWAPCHAIN
}
 Backend-specific implementation of Texture. More...
enum class  TextureAspect : uint8_t { COLOR = 1 << 0 , DEPTH = 1 << 1 , STENCIL = 1 << 2 }
 Aspect of a texture format. More...
enum class  TextureFormat : uint8_t {
  UNKNOWN = 0 , R8_UNORM , R16_FLOAT , R32_FLOAT ,
  R8G8_UNORM , R16G16_FLOAT , R32G32_FLOAT , R8G8B8A8_UNORM ,
  R8G8B8A8_SRGB , B8G8R8A8_UNORM , B8G8R8A8_SRGB , R16G16B16A16_FLOAT ,
  R32G32B32A32_FLOAT , D16_UNORM , D32_FLOAT , D24_UNORM_S8_UINT ,
  D32_FLOAT_S8_UINT , R5G6B5_UNORM_PACK16 , A1R5G5B5_UNORM_PACK16 , B10G11R11_UFLOAT_PACK32 ,
  A2B10G10R10_UNORM_PACK32 , ASTC_4x4_RGBA_UNORM_BLOCK , ASTC_4x4_RGBA_SRGB_BLOCK , BC1_RGB_UNORM_BLOCK ,
  BC1_RGB_SRGB_BLOCK , BC3_RGBA_UNORM_BLOCK , BC3_RGBA_SRGB_BLOCK , BC4_R_UNORM_BLOCK ,
  BC5_RG_UNORM_BLOCK , BC6H_RGB_UFLOAT_BLOCK , BC6H_RGB_FLOAT_BLOCK , BC7_RGBA_UNORM_BLOCK ,
  BC7_RGBA_SRGB_BLOCK , ETC2_R8G8B8_UNORM_BLOCK , ETC2_R8G8B8_SRGB_BLOCK , ETC2_R8G8B8A8_UNORM_BLOCK ,
  ETC2_R8G8B8A8_SRGB_BLOCK , EAC_R11_UNORM_BLOCK , EAC_R11G11_UNORM_BLOCK , PVRTC1_4BPP_RGBA_UNORM_BLOCK ,
  PVRTC1_4BPP_RGBA_SRGB_BLOCK
}
 Description of the internal format of a Texture. More...
enum class  TextureFilter : uint8_t { NEAREST , LINEAR }
 Filtering mode for the sampler of a Texture. More...
enum class  TextureMipmapMode : uint8_t { NONE , NEAREST , LINEAR }
 Mipmap mode for the sampler of a Texture. More...
enum class  TextureWrappingMode : uint8_t { REPEAT , CLAMP_TO_EDGE , MIRRORED_REPEAT }
 Wrapping mode of the sampler of a Texture. More...
enum class  TextureDepthComparisonMode : uint8_t {
  NEVER_PASS , LESS , LESS_OR_EQUAL , GREATER ,
  GREATER_OR_EQUAL , EQUAL , NOT_EQUAL , ALWAYS_PASS
}
 Depth comparison mode for the sampler of a Texture. More...
enum class  VertexAttributeType : uint8_t {
  U8NORM , I8NORM , U8 , I8 ,
  U8VEC2NORM , I8VEC2NORM , U8VEC2 , I8VEC2 ,
  U8VEC4NORM , I8VEC4NORM , U8VEC4 , I8VEC4 ,
  UA2B10G10R10VEC4NORM , IA2B10G10R10VEC4NORM , U16NORM , I16NORM ,
  U16 , I16 , F16 , U16VEC2NORM ,
  I16VEC2NORM , U16VEC2 , I16VEC2 , F16VEC2 ,
  U16VEC4NORM , I16VEC4NORM , U16VEC4 , I16VEC4 ,
  F16VEC4 , U32 , I32 , F32 ,
  U32VEC2 , I32VEC2 , F32VEC2 , U32VEC3 ,
  I32VEC3 , F32VEC3 , U32VEC4 , I32VEC4 ,
  F32VEC4
}
 Specification of the underlying value type of a vertex attribute. More...
enum class  TextAlignHorizontal : uint8_t {
  NONE , FIRST_LINE_START , FIRST_LINE_END , LAST_LINE_START ,
  LAST_LINE_END , LEFT , CENTER , RIGHT
}
 Horizontal text alignment mode. More...
enum class  TextAlignVertical : uint8_t {
  NONE , FIRST_LINE_TOP , FIRST_LINE_BASE , LAST_LINE_TOP ,
  LAST_LINE_BASE , BOTTOM , CENTER , TOP
}
 Vertical text alignment mode. More...
enum class  LightType : uint32_t {
  AMBIENT_LIGHT = 0 , SUN_LIGHT = 1 , DIRECTIONAL_LIGHT = 2 , POINT_LIGHT = 3 ,
  SPOT_LIGHT = 4
}
 Type of a light in a Lights3D set. More...

Functions

constexpr bool isTextureParameter (ParameterType type) noexcept
 Check if a parameter type is a texture sampler type.
constexpr TextureAspects operator~ (TextureAspect a) noexcept
 Get the complement of a texture aspect.
constexpr TextureAspects operator| (TextureAspect a, TextureAspect b) noexcept
 Get the union of two texture aspects.

Typedef Documentation

◆ VertexAttributeMask

Mask of active vertex attributes in a Mesh.

Enumeration Type Documentation

◆ ConstantType

enum class grem::graphics::ConstantType : uint8_t
strong

Specification of the underlying value type of a shader constant.

Enumerator
BOOL 

C++: bool32_t, GLSL: bool.

INT 

C++: int32_t, GLSL: int.

UINT 

C++: uint32_t, GLSL: uint.

FLOAT 

C++: float, GLSL: float.

◆ PresentationSubmissionID

enum class grem::graphics::PresentationSubmissionID : uint64_t
strong

Backend-specific implementation of Device.

Identifier for a frame that has been submitted to a Device for presentation.

◆ FieldType

enum class grem::graphics::FieldType : uint8_t
strong

Specification of the underlying value type of a field of a shader-read buffer.

Enumerator
INT 

C++: int32_t, GLSL: int.

IVEC2 

C++: i32vec2, GLSL: ivec2.

IVEC3 

C++: i32vec3, GLSL: ivec3.

IVEC4 

C++: i32vec4, GLSL: ivec4.

UINT 

C++: uint32_t, GLSL: uint.

UVEC2 

C++: u32vec2, GLSL: uvec2.

UVEC3 

C++: u32vec3, GLSL: uvec3.

UVEC4 

C++: u32vec4, GLSL: uvec4.

FLOAT 

C++: float, GLSL: float.

VEC2 

C++: vec2, GLSL: vec2.

VEC3 

C++: vec3, GLSL: vec3.

VEC4 

C++: vec4, GLSL: vec4.

MAT2 

C++: mat2, GLSL: mat2.

MAT3 

C++: mat3, GLSL: mat3.

MAT4 

C++: mat4, GLSL: mat4.

◆ MeshIndexType

enum class grem::graphics::MeshIndexType : uint8_t
strong

Specification of which type of indices is used in the index buffer of a particular Mesh.

Enumerator
U16 

Unsigned 16-bit integer.

U32 

Unsigned 32-bit integer.

◆ ParameterType

enum class grem::graphics::ParameterType : uint8_t
strong

Specification of the underlying value type of a parameter in a shader-read buffer.

Enumerator
INT 

C++: int32_t, GLSL: int.

IVEC2 

C++: i32vec2, GLSL: ivec2.

IVEC3 

C++: i32vec3, GLSL: ivec3.

IVEC4 

C++: i32vec4, GLSL: ivec4.

UINT 

C++: uint32_t, GLSL: uint.

UVEC2 

C++: u32vec2, GLSL: uvec2.

UVEC3 

C++: u32vec3, GLSL: uvec3.

UVEC4 

C++: u32vec4, GLSL: uvec4.

FLOAT 

C++: float, GLSL: float.

VEC2 

C++: vec2, GLSL: vec2.

VEC3 

C++: vec3, GLSL: vec3.

VEC4 

C++: vec4, GLSL: vec4.

MAT2 

C++: mat2, GLSL: mat2.

MAT3 

C++: mat3, GLSL: mat3.

MAT4 

C++: mat4, GLSL: mat4.

SAMPLER_2D 

C++: sampler2D, GLSL: sampler2D.

SAMPLER_2D_SHADOW 

C++: sampler2DShadow, GLSL: sampler2DShadow.

SAMPLER_2D_ARRAY 

C++: sampler2DArray, GLSL: sampler2DArray.

SAMPLER_2D_ARRAY_SHADOW 

C++: sampler2DArrayShadow, GLSL: sampler2DArrayShadow.

SAMPLER_CUBE 

C++: samplerCube, GLSL: samplerCube.

SAMPLER_CUBE_SHADOW 

C++: samplerCubeShadow, GLSL: samplerCubeShadow.

SAMPLER_CUBE_ARRAY 

C++: samplerCubeArray, GLSL: samplerCubeArray.

SAMPLER_CUBE_ARRAY_SHADOW 

C++: samplerCubeArrayShadow, GLSL: samplerCubeArrayShadow.

◆ DepthBufferMode

enum class grem::graphics::DepthBufferMode : uint8_t
strong

Backend-specific implementation of ShaderPipeline.

Depth buffer mode used in a ShaderPipelineOptions.

See also
ShaderPipelineOptions::depthBufferMode
Enumerator
NONE 

Ignore the depth buffer.

USE_DEPTH_TEST 

Evaluate the depth test defined by the DepthTestPredicate to determine whether the pixel should be rendered or discarded.

If the test fails, the new pixel is discarded and will not be rendered. If the test succeeds, the new pixel is rendered, and the depth buffer value is overwritten with the new depth value.

Note
In 3D, depth testing is necessary to avoid 3D objects and faces being incorrectly rendered on top of each other. However, for 2D shaders, the depth test should typically be disabled in favor of using the painter's algorithm (back-to-front rendering) instead.
USE_DEPTH_TEST_READ_ONLY 

Evaluate the depth test defined by the DepthTestPredicate to determine whether the pixel should be rendered or discarded.

If the test fails, the new pixel is discarded and will not be rendered. If the test succeeds, the new pixel is rendered, but the depth value is left untouched.

◆ DepthTestPredicate

enum class grem::graphics::DepthTestPredicate : uint8_t
strong

Depth test predicate used in a ShaderPipelineOptions.

See also
ShaderPipelineOptions::depthTestPredicate
Enumerator
NEVER_PASS 

The depth test always fails.

LESS 

The depth test passes if and only if the new depth value is less than the old depth value.

LESS_OR_EQUAL 

The depth test passes if and only if the new depth value is less than or equal to the old depth value.

GREATER 

The depth test passes if and only if the new depth value is greater than the old depth value.

GREATER_OR_EQUAL 

The depth test passes if and only if the new depth value is greater than or equal to the old depth value.

EQUAL 

The depth test passes if and only if the new depth value is equal to the old depth value.

NOT_EQUAL 

The depth test passes if and only if the new depth value is not equal to the old depth value.

ALWAYS_PASS 

The depth test always passes.

◆ StencilBufferMode

enum class grem::graphics::StencilBufferMode : uint8_t
strong

Stencil buffer mode used in a ShaderPipelineOptions.

See also
ShaderPipelineOptions::stencilBufferMode
Enumerator
NONE 

Ignore the stencil buffer.

USE_STENCIL_TEST 

Evaluate the stencil test defined by the StencilTestPredicate to determine whether the pixel should be rendered or discarded, then perform the corresponding StencilBufferOperation on the stencil buffer value.

If the test fails, the new pixel is discarded and will not be rendered.

◆ StencilTestPredicate

enum class grem::graphics::StencilTestPredicate : uint8_t
strong

Stencil test predicate used in a ShaderPipelineOptions.

See also
ShaderPipelineOptions::stencilTestPredicate
Enumerator
NEVER_PASS 

The stencil test always fails.

LESS 

The stencil test passes if and only if the given reference value is less than the current value in the stencil buffer.

The stencil value and the reference value are both masked with the given mask before performing the check.

LESS_OR_EQUAL 

The stencil test passes if and only if the given reference value is less than or equal to the current value in the stencil buffer.

The stencil value and the reference value are both masked with the given mask before performing the check.

GREATER 

The stencil test passes if and only if the given reference value is greater than the current value in the stencil buffer.

The stencil value and the reference value are both masked with the given mask before performing the check.

GREATER_OR_EQUAL 

The stencil test passes if and only if the given reference value is greater than or equal to the current value in the stencil buffer.

The stencil value and the reference value are both masked with the given mask before performing the check.

EQUAL 

The stencil test passes if and only if the given reference value is equal to the current value in the stencil buffer.

The stencil value and the reference value are both masked with the given mask before performing the check.

NOT_EQUAL 

The stencil test passes if and only if the given reference value is not equal to the current value in the stencil buffer.

The stencil value and the reference value are both masked with the given mask before performing the check.

ALWAYS_PASS 

The stencil test always passes.

◆ StencilBufferOperation

enum class grem::graphics::StencilBufferOperation : uint8_t
strong

Operation to perform after evaluating the stencil test in a ShaderPipelineOptions.

See also
ShaderPipelineOptions::stencilBufferOperationOnStencilTestFail
ShaderPipelineOptions::stencilBufferOperationOnDepthTestFail
ShaderPipelineOptions::stencilBufferOperationOnPass
Enumerator
KEEP 

Keep the current value in the stencil buffer.

SET_TO_ZERO 

Set the stencil buffer value to 0.

REPLACE 

Set the stencil buffer value to the given reference value.

INCREMENT_AND_CLAMP 

Increment the stencil buffer value by 1, unless it is already maxed out.

INCREMENT_AND_WRAP 

Increment the stencil buffer value by 1, or wrap around to 0 if it was maxed out.

DECREMENT_AND_CLAMP 

Decrement the stencil buffer value by 1, unless it is already 0.

DECREMENT_AND_WRAP 

Decrement the stencil buffer value by 1, or wrap around to the maximum value if it was 0.

BITWISE_INVERT 

Toggle each bit in the stencil buffer value.

◆ PrimitiveType

enum class grem::graphics::PrimitiveType : uint8_t
strong

Graphical primitive type formed by mesh vertices, used in a ShaderPipelineOptions.

See also
ShaderPipelineOptions::primitiveType
Enumerator
POINTS 

Individual points.

LINES 

Each consecutive pair of points forms an individual line segment.

LINE_STRIP 

Each point, except the first, forms a line segment to the previous point.

TRIANGLES 

Each consecutive triple of points forms an individual filled triangle.

TRIANGLE_STRIP 

Each point, except the first two, forms a filled triangle with the previous two points.

◆ PolygonMode

enum class grem::graphics::PolygonMode : uint8_t
strong

Polygon mode used in a ShaderPipelineOptions.

See also
ShaderPipelineOptions::polygonMode
Enumerator
POINT 

Polygon vertices are drawn as single-pixel points.

LINE 

Polygon edges are drawn as single-pixel-wide line segments.

FILL 

Polygon faces are filled in.

◆ FaceCullingMode

enum class grem::graphics::FaceCullingMode : uint8_t
strong

Face culling mode used in a ShaderPipelineOptions.

See also
ShaderPipelineOptions::faceCullingMode
Enumerator
NONE 

Ignore facing, don't cull primitives based on their winding order.

CULL_BACK_FACES 

Discard back-facing faces.

CULL_FRONT_FACES 

Discard front-facing faces.

CULL_FRONT_AND_BACK_FACES 

Discard all faces, only render primitives without faces, such as lines and points.

◆ FrontFace

enum class grem::graphics::FrontFace : uint8_t
strong

Front face winding order used in a ShaderPipelineOptions.

See also
ShaderPipelineOptions::frontFace
Enumerator
COUNTERCLOCKWISE 

Consider faces with counterclockwise winding order to be front-facing.

CLOCKWISE 

Consider faces with clockwise winding order to be front-facing.

◆ BlendFactor

enum class grem::graphics::BlendFactor : uint8_t
strong

Blend factor used in the BlendState of a ShaderPipelineOptions.

See also
BlendState
Enumerator
ZERO 

Multiply all components by 0.

ONE 

Multiply all components by 1.

SOURCE_COLOR 

Multiply all components by the source components.

ONE_MINUS_SOURCE_COLOR 

Multiply all components by 1 minus each source component.

DESTINATION_COLOR 

Multiply all components by the destination components.

ONE_MINUS_DESTINATION_COLOR 

Multiply all components by 1 minus each destination component.

SOURCE_ALPHA 

Multiply all components by the source alpha.

ONE_MINUS_SOURCE_ALPHA 

Multiply all components by 1 minus the source alpha.

DESTINATION_ALPHA 

Multiply all components by the destination alpha.

ONE_MINUS_DESTINATION__ALPHA 

Multiply all components by 1 minus the destination alpha.

CONSTANT_COLOR 

Multiply all components by the constant components.

ONE_MINUS_CONSTANT_COLOR 

Multiply all components by 1 minus each constant component.

CONSTANT_ALPHA 

Multiply all components by the constant alpha.

ONE_MINUS_CONSTANT_ALPHA 

Multiply all components by 1 minus the constant alpha.

SOURCE_ALPHA_SATURATE 

Multiply the color components by the smaller of the source alpha or 1 minus the destination alpha, and multiply the alpha component by 1.

◆ BlendOperation

enum class grem::graphics::BlendOperation : uint8_t
strong

Blend operation used in the BlendState of a ShaderPipelineOptions.

See also
BlendState
Enumerator
ADD 

Add the blended components.

SUBTRACT 

Subtract the blended destination components from the blended source components.

REVERSE_SUBTRACT 

Subtract the blended source components from the blended destination components.

MIN 

Take the minimum of the components.

MAX 

Take the maximum of the components.

◆ TextureType

enum class grem::graphics::TextureType : uint8_t
strong

Backend-specific implementation of Texture.

Type of a Texture.

Enumerator
EMPTY 

Empty texture without a value.

TEXTURE_2D 

Texture set up to store a single 2D image.

TEXTURE_2D_ARRAY 

Texture set up to store an array of 2D images.

TEXTURE_CUBE 

Texture set up to store a cube of 6 sides of square 2D images.

TEXTURE_CUBE_ARRAY 

Texture set up to store an array of cubes of 6 sides of square 2D images.

RENDERBUFFER 

Unsampled texture set up to store a potentially multisampled 2D image.

SWAPCHAIN 

Unsampled texture representing a presentation swapchain.

◆ TextureAspect

enum class grem::graphics::TextureAspect : uint8_t
strong

Aspect of a texture format.

Enumerator
COLOR 

Color buffer.

DEPTH 

Depth buffer.

STENCIL 

Stencil buffer.

◆ TextureFormat

enum class grem::graphics::TextureFormat : uint8_t
strong

Description of the internal format of a Texture.

Enumerator
UNKNOWN 

Unknown texture format.

R8_UNORM 

Raw bitmap where each texel comprises 1 normalized 8-bit unsigned integer component: red.

R16_FLOAT 

Raw bitmap where each texel comprises 1 16-bit floating-point component: red.

R32_FLOAT 

Raw bitmap where each texel comprises 1 32-bit floating-point component: red.

R8G8_UNORM 

Raw bitmap where each texel comprises 2 normalized 8-bit unsigned integer components: red, green.

R16G16_FLOAT 

Raw bitmap where each texel comprises 2 16-bit floating-point components: red, green.

R32G32_FLOAT 

Raw bitmap where each texel comprises 2 32-bit floating-point components: red, green.

R8G8B8A8_UNORM 

Raw bitmap where each texel comprises 4 normalized 8-bit unsigned integer components: red, green, blue, alpha.

R8G8B8A8_SRGB 

Raw bitmap where each texel comprises 3 sRGB-encoded and 1 normalized 8-bit unsigned integer components: red, green, blue, alpha.

B8G8R8A8_UNORM 

Raw bitmap where each texel comprises 4 normalized 8-bit unsigned integer components: blue, green, red, alpha.

B8G8R8A8_SRGB 

Raw bitmap where each texel comprises 3 sRGB-encoded and 1 normalized 8-bit unsigned integer components: blue, green, red, alpha.

R16G16B16A16_FLOAT 

Raw bitmap where each texel comprises 4 16-bit floating-point components: red, green, blue, alpha.

R32G32B32A32_FLOAT 

Raw bitmap where each texel comprises 4 32-bit floating-point components: red, green, blue, alpha.

D16_UNORM 

Raw bitmap where each texel comprises 1 normalized 16-bit unsigned integer component: depth.

D32_FLOAT 

Raw bitmap where each texel comprises 1 32-bit floating-point component: depth.

D24_UNORM_S8_UINT 

Raw bitmap where each texel comprises 1 normalized 24-bit unsigned integer depth component and 1 8-bit unsigned integer stencil component.

D32_FLOAT_S8_UINT 

Raw bitmap where each texel comprises 1 32-bit floating-point depth component and 1 8-bit unsigned integer stencil component.

R5G6B5_UNORM_PACK16 

Packed bitmap with the following 16-bit unsigned integer RGB texel format: RRRRRGGGGGGBBBBB.

A1R5G5B5_UNORM_PACK16 

Packed bitmap with the following 16-bit unsigned integer RGBA texel format: ARRRRRGGGGGBBBBB.

B10G11R11_UFLOAT_PACK32 

Packed bitmap with the following 32-bit unsigned floating-point RGB texel format: BBBBBBBBBBGGGGGGGGGGGRRRRRRRRRRR.

A2B10G10R10_UNORM_PACK32 

Packed bitmap with the following 32-bit unsigned integer RGBA texel format: AABBBBBBBBBBGGGGGGGGGGRRRRRRRRRR.

ASTC_4x4_RGBA_UNORM_BLOCK 

ASTC block-compressed RGBA texture using 128 bits per 4x4 block.

ASTC_4x4_RGBA_SRGB_BLOCK 

ASTC block-compressed RGBA texture using 128 bits per 4x4 block.

BC1_RGB_UNORM_BLOCK 

S3TC BC1 (DXT1) block-compressed RGB texture using 64 bits per 4x4 block.

BC1_RGB_SRGB_BLOCK 

S3TC BC1 (DXT1) block-compressed sRGB texture using 64 bits per 4x4 block.

BC3_RGBA_UNORM_BLOCK 

S3TC BC3 (DXT5) block-compressed RGBA texture using 128 bits per 4x4 block.

BC3_RGBA_SRGB_BLOCK 

S3TC BC3 (DXT5) block-compressed sRGBA texture using 128 bits per 4x4 block.

BC4_R_UNORM_BLOCK 

S3TC BC4 (RGTC1) block-compressed single-channel texture using 64 bits per 4x4 block.

BC5_RG_UNORM_BLOCK 

S3TC BC5 (RGTC2) block-compressed double-channel texture using 128 bits per 4x4 block.

BC6H_RGB_UFLOAT_BLOCK 

S3TC BC6H (BPTC) block-compressed unsigned floating-point RGB texture using 128 bits per 4x4 block.

BC6H_RGB_FLOAT_BLOCK 

S3TC BC6H (BPTC) block-compressed signed floating-point RGB texture using 128 bits per 4x4 block.

BC7_RGBA_UNORM_BLOCK 

S3TC BC7 (BPTC) block-compressed RGBA texture using 128 bits per 4x4 block.

BC7_RGBA_SRGB_BLOCK 

S3TC BC7 (BPTC) block-compressed sRGBA texture using 128 bits per 4x4 block.

ETC2_R8G8B8_UNORM_BLOCK 

ETC2 block-compressed RGB texture using 64 bits per 4x4 block.

ETC2_R8G8B8_SRGB_BLOCK 

ETC2 block-compressed sRGB texture using 64 bits per 4x4 block.

ETC2_R8G8B8A8_UNORM_BLOCK 

ETC2 block-compressed RGBA texture using 128 bits per 4x4 block.

ETC2_R8G8B8A8_SRGB_BLOCK 

ETC2 block-compressed sRGBA texture using 128 bits per 4x4 block.

EAC_R11_UNORM_BLOCK 

ETC2 EAC block-compressed single-channel texture using 64 bits per 4x4 block.

EAC_R11G11_UNORM_BLOCK 

ETC2 EAC block-compressed double-channel texture using 128 bits per 4x4 block.

PVRTC1_4BPP_RGBA_UNORM_BLOCK 

PVRTC1 block-compressed RGBA texture using 64 bits per 4x4 block.

PVRTC1_4BPP_RGBA_SRGB_BLOCK 

PVRTC1 block-compressed sRGBA texture using 64 bits per 4x4 block.

◆ TextureFilter

enum class grem::graphics::TextureFilter : uint8_t
strong

Filtering mode for the sampler of a Texture.

Enumerator
NEAREST 

Use the nearest neighbor to the sampled texel, which results in a blocky appearance.

LINEAR 

Interpolate between texels for a smoother appearance.

◆ TextureMipmapMode

enum class grem::graphics::TextureMipmapMode : uint8_t
strong

Mipmap mode for the sampler of a Texture.

Enumerator
NONE 

Always use the most detailed mip level (level 0).

NEAREST 

Use the mip level nearest to the displayed size.

LINEAR 

Interpolate between the two nearest mip levels to the displayed size.

◆ TextureWrappingMode

enum class grem::graphics::TextureWrappingMode : uint8_t
strong

Wrapping mode of the sampler of a Texture.

Enumerator
REPEAT 

Wrap the texture coordinates around the 0-1 range.

CLAMP_TO_EDGE 

Clamp to the edge of the texture when sampling outside the 0-1 range.

MIRRORED_REPEAT 

Mirror the texture coordinates in the 0-1 range.

◆ TextureDepthComparisonMode

enum class grem::graphics::TextureDepthComparisonMode : uint8_t
strong

Depth comparison mode for the sampler of a Texture.

Enumerator
NEVER_PASS 

The depth test always fails.

LESS 

The depth test passes if and only if the new depth value is less than the reference depth value.

LESS_OR_EQUAL 

The depth test passes if and only if the new depth value is less than or equal to the reference depth value.

GREATER 

The depth test passes if and only if the new depth value is greater than the reference depth value.

GREATER_OR_EQUAL 

The depth test passes if and only if the new depth value is greater than or equal to the reference depth value.

EQUAL 

The depth test passes if and only if the new depth value is equal to the reference depth value.

NOT_EQUAL 

The depth test passes if and only if the new depth value is not equal to the reference depth value.

ALWAYS_PASS 

The depth test always passes.

◆ VertexAttributeType

enum class grem::graphics::VertexAttributeType : uint8_t
strong

Specification of the underlying value type of a vertex attribute.

Enumerator
U8NORM 
I8NORM 
U8 
I8 
U8VEC2NORM 
I8VEC2NORM 
U8VEC2 
I8VEC2 
U8VEC4NORM 
I8VEC4NORM 
U8VEC4 
I8VEC4 
UA2B10G10R10VEC4NORM 
IA2B10G10R10VEC4NORM 
U16NORM 
I16NORM 
U16 
I16 
F16 
U16VEC2NORM 
I16VEC2NORM 
U16VEC2 
I16VEC2 
F16VEC2 
U16VEC4NORM 
I16VEC4NORM 
U16VEC4 
I16VEC4 
F16VEC4 
U32 
I32 
F32 
U32VEC2 
I32VEC2 
F32VEC2 
U32VEC3 
I32VEC3 
F32VEC3 
U32VEC4 
I32VEC4 
F32VEC4 

◆ TextAlignHorizontal

enum class grem::graphics::TextAlignHorizontal : uint8_t
strong

Horizontal text alignment mode.

Enumerator
NONE 

No horizontal alignment.

FIRST_LINE_START 

Align to the start of the first glyph in the first line of the text.

FIRST_LINE_END 

Align to the end of the last glyph in the first line of the text.

LAST_LINE_START 

Align to the start of the first glyph in the last line of the text.

LAST_LINE_END 

Align to the end of the last glyph in the last line of the text.

LEFT 

Align to the left of the bounding box of the text.

CENTER 

Align to the horizontal center of the bounding box of the text.

RIGHT 

Align to the right of the bounding box of the text.

◆ TextAlignVertical

enum class grem::graphics::TextAlignVertical : uint8_t
strong

Vertical text alignment mode.

Enumerator
NONE 

No vertical alignment.

FIRST_LINE_TOP 

Align to the ascender of the first line in the text.

FIRST_LINE_BASE 

Align to the baseline of the first line in the text.

LAST_LINE_TOP 

Align to the ascender of the last line in the text.

LAST_LINE_BASE 

Align to the baseline of the last line in the text.

BOTTOM 

Align to the bottom of the bounding box of the text.

CENTER 

Align to the vertical center of the bounding box of the text.

TOP 

Align to the top of the bounding box of the text.

◆ LightType

enum class grem::graphics::LightType : uint32_t
strong

Type of a light in a Lights3D set.

Enumerator
AMBIENT_LIGHT 

See AmbientLightOptions3D.

SUN_LIGHT 

See SunLightOptions3D.

DIRECTIONAL_LIGHT 

See DirectionalLightOptions3D.

POINT_LIGHT 

See PointLightOptions3D.

SPOT_LIGHT 

See SpotLightOptions3D.

Function Documentation

◆ isTextureParameter()

bool grem::graphics::isTextureParameter ( ParameterType type)
nodiscardconstexprnoexcept

Check if a parameter type is a texture sampler type.

Parameters
typeparameter type to check.
Returns
true if the given parameter type is a texture parameter, false otherwise.

◆ operator~()

TextureAspects grem::graphics::operator~ ( TextureAspect a)
constexprnoexcept

Get the complement of a texture aspect.

Parameters
athe aspect to invert.
Returns
a set containing all possible aspects except the given aspect.

◆ operator|()

TextureAspects grem::graphics::operator| ( TextureAspect a,
TextureAspect b )
constexprnoexcept

Get the union of two texture aspects.

Parameters
afirst aspect.
bsecond aspect.
Returns
a set containing both a and b.