Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
Classes | Enumerations
Resources

Handle resource loading/saving tasks.

The Resources manager is sole responsible for allocation/deallocation of resources loaded from the disk directory hierarchy or from an archive. Images and meshes can be sent to the GPU as textures and meshes. Storage settings (CPU/GPU, layout in memory, format) are specified at first use of a resource.

Classes

class  BoundingSphere
 Represent the sphere of smallest radius containing a given object or region of space. More...
 
class  BoundingBox
 Represent the smallest axis-aligne box containing a given object or region of space. More...
 
class  Frustum
 Represent a 3D frustum, volume defined by the intersection of six planes. More...
 
class  Buffer
 General purpose GPU buffer, with different use types determining its memory type, visibility and access pattern. More...
 
class  UniformBufferBase
 Uniform buffer exposed to all shader stages, that can be updated at varying frequencies. Multiple instances of the GPU data will be maintained internally. More...
 
class  UniformBuffer< T >
 Represents a buffer containing uniform data, stored on the CPU and GPU. Depending on the update frequency of the CPU data, the buffer will maintain one or multiple copies of the data on the GPU. More...
 
class  Font
 Font loading and storage: texture atlas, codepoints supported, dimensions of each glyph. More...
 
class  Image
 Represents an image composed of pixels with values in [0,1]. Provide image loading/saving utilities, for both LDR and HDR images. More...
 
class  Library
 The library provides a few commonly-used resources without having to set them up or query them from the resources manager. More...
 
class  Mesh
 Represents a geometric mesh composed of vertices, other attributes and triangles. More...
 
class  Resources
 The Resources manager is responsible for all resources loading and setup. More...
 
class  Texture
 Represents a texture containing one or more images, stored on the CPU and/or GPU. More...
 

Enumerations

enum class  ShaderType : uint {
  ShaderType::VERTEX , ShaderType::TESSCONTROL , ShaderType::TESSEVAL , ShaderType::FRAGMENT ,
  ShaderType::COMPUTE , COUNT
}
 The type of a shader. More...
 
enum class  BufferType : uint {
  BufferType::VERTEX , BufferType::INDEX , BufferType::UNIFORM , BufferType::CPUTOGPU ,
  BufferType::GPUTOCPU , BufferType::STORAGE
}
 The type of data a buffer is storing, determining its use. More...
 
enum class  UniformFrequency : uint { UniformFrequency::STATIC , UniformFrequency::FRAME , UniformFrequency::VIEW , UniformFrequency::DYNAMIC }
 The frequency at which a uniform buffer might be updated. More...
 
enum class  TestFunction : uint {
  TestFunction::NEVER , TestFunction::LESS , TestFunction::LEQUAL , TestFunction::EQUAL ,
  TestFunction::GREATER , TestFunction::GEQUAL , TestFunction::NOTEQUAL , TestFunction::ALWAYS
}
 Depth or stencil test function. More...
 
enum class  StencilOp : uint {
  StencilOp::KEEP , StencilOp::ZERO , StencilOp::REPLACE , StencilOp::INCR ,
  StencilOp::INCRWRAP , StencilOp::DECR , StencilOp::DECRWRAP , StencilOp::INVERT
}
 Stencil operation to perform. More...
 
enum class  BlendEquation : uint {
  BlendEquation::ADD , BlendEquation::SUBTRACT , BlendEquation::REVERSE_SUBTRACT , BlendEquation::MIN ,
  BlendEquation::MAX
}
 Blending mix equation for each component. Below we use src and dst to denote the (modulated by the blend functions) values to blend. Note that min and max do not apply the modulation factor to each term. More...
 
enum class  BlendFunction : uint {
  BlendFunction::ZERO , BlendFunction::ONE , BlendFunction::SRC_COLOR , BlendFunction::ONE_MINUS_SRC_COLOR ,
  BlendFunction::DST_COLOR , BlendFunction::ONE_MINUS_DST_COLOR , BlendFunction::SRC_ALPHA , BlendFunction::ONE_MINUS_SRC_ALPHA ,
  BlendFunction::DST_ALPHA , BlendFunction::ONE_MINUS_DST_ALPHA
}
 How the source and destination values to blend are obtained from the pixel data by scaling. More...
 
enum class  Faces : uint { Faces::FRONT , Faces::BACK , Faces::ALL }
 Used to select a subset of faces. Front faces are defined counter-clockwise. More...
 
enum class  PolygonMode : uint { PolygonMode::FILL , PolygonMode::LINE , PolygonMode::POINT }
 How polygons should be rasterized. More...
 
enum class  TextureShape : uint {
  TextureShape::D1 = 1 << 1 , TextureShape::D2 = 1 << 2 , TextureShape::D3 = 1 << 3 , TextureShape::Cube = 1 << 4 ,
  TextureShape::Array = 1 << 5 , TextureShape::Array1D = D1 | Array , TextureShape::Array2D = D2 | Array , TextureShape::ArrayCube = Cube | Array
}
 The shape of a texture: dimensions, layers organisation. More...
 
enum class  Filter : uint {
  Filter::NEAREST = 0 , Filter::LINEAR , Filter::NEAREST_NEAREST , Filter::LINEAR_NEAREST ,
  Filter::NEAREST_LINEAR , Filter::LINEAR_LINEAR
}
 The filtering mode of a texture: we deduce the magnification filter from the minification filter for now. More...
 
enum class  Wrap : uint { Wrap::CLAMP = 0 , Wrap::REPEAT , Wrap::MIRROR }
 The wrapping mode of a texture. More...
 
enum class  Layout : uint {
  R8 , RG8 , RGBA8 , SRGB8_ALPHA8 ,
  BGRA8 , SBGR8_ALPHA8 , R16 , RG16 ,
  RGBA16 , R8_SNORM , RG8_SNORM , RGBA8_SNORM ,
  R16_SNORM , RG16_SNORM , R16F , RG16F ,
  RGBA16F , R32F , RG32F , RGBA32F ,
  RGB5_A1 , A2_BGR10 , A2_RGB10 , DEPTH_COMPONENT32F ,
  DEPTH24_STENCIL8 , DEPTH_COMPONENT16 , DEPTH_COMPONENT24 , DEPTH32F_STENCIL8 ,
  R8UI , R16I , R16UI , R32I ,
  R32UI , RG8I , RG8UI , RG16I ,
  RG16UI , RG32I , RG32UI , RGBA8I ,
  RGBA8UI , RGBA16I , RGBA16UI , RGBA32I ,
  RGBA32UI , NONE
}
 The layout of a texture: components count and type.
 
enum class  Storage : uint {
  NONE = 0 , Storage::GPU = 1 , Storage::CPU = 2 , Storage::BOTH = (GPU | CPU) ,
  Storage::FORCE_FRAME = 4
}
 Storage and loading options. More...
 

Enumeration Type Documentation

◆ BlendEquation

enum class BlendEquation : uint
strong

Blending mix equation for each component. Below we use src and dst to denote the (modulated by the blend functions) values to blend. Note that min and max do not apply the modulation factor to each term.

Enumerator
ADD 

Perform src + dst.

SUBTRACT 

Perform src - dst.

REVERSE_SUBTRACT 

Perform dst - src.

MIN 

Perform min(src, dst)

MAX 

Perform max(src, dst)

◆ BlendFunction

enum class BlendFunction : uint
strong

How the source and destination values to blend are obtained from the pixel data by scaling.

Enumerator
ZERO 

Multiply by 0.

ONE 

Multiply by 1.

SRC_COLOR 

Multiply by src color, component wise.

ONE_MINUS_SRC_COLOR 

Multiply by 1-src color, component wise.

DST_COLOR 

Multiply by dst color, component wise.

ONE_MINUS_DST_COLOR 

Multiply by 1-dst color, component wise.

SRC_ALPHA 

Multiply by src scalar alpha.

ONE_MINUS_SRC_ALPHA 

Multiply by 1-src scalar alpha.

DST_ALPHA 

Multiply by dst scalar alpha.

ONE_MINUS_DST_ALPHA 

Multiply by 1-dst scalar alpha.

◆ BufferType

enum class BufferType : uint
strong

The type of data a buffer is storing, determining its use.

Enumerator
VERTEX 

Vertex data.

INDEX 

Element indices.

UNIFORM 

Uniform data.

CPUTOGPU 

Transfer.

GPUTOCPU 

Transfer.

STORAGE 

Compute storage.

◆ Faces

enum class Faces : uint
strong

Used to select a subset of faces. Front faces are defined counter-clockwise.

Enumerator
FRONT 

Front (CCW) faces.

BACK 

Back (CW) faces.

ALL 

All faces.

◆ Filter

enum class Filter : uint
strong

The filtering mode of a texture: we deduce the magnification filter from the minification filter for now.

Enumerator
NEAREST 

Nearest neighbour, no mipmap.

LINEAR 

Bilinear, no mipmap.

NEAREST_NEAREST 

Nearest neighbour, closest mipmap.

LINEAR_NEAREST 

Bilinear, closest mipmap.

NEAREST_LINEAR 

Nearest neighbour, linear blend of mipmaps.

LINEAR_LINEAR 

Bilinear, linear blend of mipmaps.

◆ PolygonMode

enum class PolygonMode : uint
strong

How polygons should be rasterized.

Enumerator
FILL 

As filled polygons.

LINE 

As wireframe edges.

POINT 

As vertex points.

◆ ShaderType

enum class ShaderType : uint
strong

The type of a shader.

Enumerator
VERTEX 

Vertex shader.

TESSCONTROL 

Tessellation control shader.

TESSEVAL 

Tessellation evaluation shader.

FRAGMENT 

Fragment shader.

COMPUTE 

Compute shader.

◆ StencilOp

enum class StencilOp : uint
strong

Stencil operation to perform.

Enumerator
KEEP 

Keep current value.

ZERO 

Set value to zero.

REPLACE 

Set value to reference.

INCR 

Increment value and clamp.

INCRWRAP 

Increment value and wrap.

DECR 

Decrement value and clamp.

DECRWRAP 

Decrement value and wrap.

INVERT 

Invert value bitwise.

◆ Storage

enum class Storage : uint
strong

Storage and loading options.

Enumerator
GPU 

Store on the GPU.

CPU 

Store on the CPU.

BOTH 

Store on both the CPU and GPU.

FORCE_FRAME 

For meshes, force computation of a local frame.

◆ TestFunction

enum class TestFunction : uint
strong

Depth or stencil test function.

Enumerator
NEVER 

Fail in all cases.

LESS 

Pass if lower.

LEQUAL 

Pass if lower or equal.

EQUAL 

Pass if equal.

GREATER 

Pass if greater.

GEQUAL 

Pass if greater or equal.

NOTEQUAL 

Pass if different.

ALWAYS 

Always pass.

◆ TextureShape

enum class TextureShape : uint
strong

The shape of a texture: dimensions, layers organisation.

Enumerator
D1 

1D texture.

D2 

2D texture.

D3 

3D texture.

Cube 

Cubemap texture.

Array 

General texture array flag.

Array1D 

1D texture array.

Array2D 

2D texture array.

ArrayCube 

Cubemap texture array.

◆ UniformFrequency

enum class UniformFrequency : uint
strong

The frequency at which a uniform buffer might be updated.

Enumerator
STATIC 

Data won't be updated after upload.

FRAME 

Data will be updated at most once per frame.

VIEW 

Data will be updated a few times per frame.

DYNAMIC 

Data will be updated many times per frame.

◆ Wrap

enum class Wrap : uint
strong

The wrapping mode of a texture.

Enumerator
CLAMP 

Clamp to the edges of the texture.

REPEAT 

Repeat the texture.

MIRROR 

Repeat the texture using flipped versions to ensure continuity.