Graphics module
Provides a graphics API abstraction.
Files
- file render_device.hpp
- Class cubos::core:: gl:: RenderDevice and related types. 
- file util.hpp
- Function cubos::core:: gl:: generateScreenQuad. 
Classes
- struct cubos::core::gl::FramebufferDesc
- Describes a framebuffer.
- struct cubos::core::gl::RasterStateDesc
- Decribes a rasterizer state.
- struct cubos::core::gl::DepthStencilStateDesc
- Describes a depth stencil state.
- struct cubos::core::gl::BlendStateDesc
- Describes a blend state.
- struct cubos::core::gl::SamplerDesc
- Describes a sampler.
- struct cubos::core::gl::Texture2DDesc
- Describes a 2D texture.
- struct cubos::core::gl::Texture2DArrayDesc
- Describes a 2D texture array.
- struct cubos::core::gl::Texture3DDesc
- Describes a 3D texture.
- struct cubos::core::gl::CubeMapDesc
- Describes a cube map.
- struct cubos::core::gl::ConstantBufferElement
- Describes an element in a constant buffer.
- struct cubos::core::gl::ConstantBufferStructure
- Describes the structure of a constant buffer.
- struct cubos::core::gl::VertexElement
- Describes a vertex element.
- struct cubos::core::gl::VertexArrayDesc
- Describes a vertex array.
- class cubos::core::gl::RenderDevice
- Interface used to wrap low-level rendering APIs such as OpenGL.
Enums
- enum class Property { MaxAnisotropy, ComputeSupported }
- Render device properties that can be queried at runtime.
- enum class Usage { Default, Dynamic, Static }
- Usage mode for buffers and textures.
- enum class Type { Byte, Short, Int, UByte, UShort, UInt, NByte, NShort, NUByte, NUShort, Float }
- Data type.
- enum class IndexFormat { UShort, UInt }
- Index format.
- enum class TextureFormat { R8SNorm, RG8SNorm, RGBA8SNorm, R8UNorm, R16UNorm, RG8UNorm, RG16UNorm, RGBA8UNorm, RGBA16UNorm, R8SInt, R16SInt, RG8SInt, RG16SInt, RGBA8SInt, RGBA16SInt, R8UInt, R16UInt, RG8UInt, RG16UInt, RGBA8UInt, RGBA16UInt, R16Float, R32Float, RG16Float, RG32Float, RGB16Float, RGB32Float, RGBA16Float, RGBA32Float, Depth16, Depth32, Depth24Stencil8, Depth32Stencil8 }
- Texture format.
- enum class AddressMode { Repeat, Mirror, Clamp }
- Texture address mode.
- enum class TextureFilter { None, Nearest, Linear }
- Texture filter type.
- enum class Winding { CW, CCW }
- Triangle winding mode.
- enum class Face { Front, Back, FrontAndBack }
- Specifies a face.
- enum class Compare { Never, Less, LEqual, Greater, GEqual, Equal, NEqual, Always }
- Comparison function.
- enum class StencilAction { Zero, Keep, Replace, Increment, IncrementWrap, Decrement, DecrementWrap, Invert }
- Stencil action.
- enum class BlendFactor { Zero, One, SrcColor, InvSrcColor, DstColor, InvDstColor, SrcAlpha, InvSrcAlpha, DstAlpha, InvDstAlpha }
- Blend factor.
- enum class BlendOp { Add, Substract, RevSubstract, Min, Max }
- Blend operation.
- enum class Stage { Vertex, Geometry, Pixel, Compute }
- Shader stage type.
- enum class CubeFace { PositiveX = 0, NegativeX = 1, PositiveY = 2, NegativeY = 3, PositiveZ = 4, NegativeZ = 5 }
- Cube map face.
- enum class MemoryBarriers { None = 0, VertexBuffer = 1, IndexBuffer = 2, ConstantBuffer = 4, ImageAccess = 8, TextureAccess = 16, Framebuffer = 32, All = VertexBuffer | IndexBuffer | ConstantBuffer | ImageAccess | TextureAccess | Framebuffer }
- Memory barrier flags for synchronization.
- enum class Access { Read, Write, ReadWrite }
- Access mode for a resource.
Typedefs
- using Framebuffer = std::shared_ptr<impl::Framebuffer>
- Handle to a framebuffer.
- using RasterState = std::shared_ptr<impl::RasterState>
- Handle to a rasterizer state.
- using DepthStencilState = std::shared_ptr<impl::DepthStencilState>
- Handle to a depth stencil state.
- using BlendState = std::shared_ptr<impl::BlendState>
- Handle to a blend state.
- using PixelPackBuffer = std::shared_ptr<impl::PixelPackBuffer>
- Handle to a pixel pack buffer.
- using Sampler = std::shared_ptr<impl::Sampler>
- Handle to a sampler.
- using Texture2D = std::shared_ptr<impl::Texture2D>
- Handle to a 2D texture.
- using Texture2DArray = std::shared_ptr<impl::Texture2DArray>
- Handle to a 2D texture array.
- using Texture3D = std::shared_ptr<impl::Texture3D>
- Handle to a 3D texture.
- using CubeMap = std::shared_ptr<impl::CubeMap>
- Handle to a cube map.
- using ConstantBuffer = std::shared_ptr<impl::ConstantBuffer>
- Handle to a constant buffer.
- using IndexBuffer = std::shared_ptr<impl::IndexBuffer>
- Handle to an index buffer.
- using VertexBuffer = std::shared_ptr<impl::VertexBuffer>
- Handle to a vertex buffer.
- using VertexArray = std::shared_ptr<impl::VertexArray>
- Handle to a vertex array.
- using ShaderStage = std::shared_ptr<impl::ShaderStage>
- Handle to a shader stage.
- using ShaderPipeline = std::shared_ptr<impl::ShaderPipeline>
- Handle to a shader pipeline.
- using ShaderBindingPoint = impl::ShaderBindingPoint*
- Handle to a shader binding point.
- using Timer = std::shared_ptr<impl::Timer>
- Handle to a timer.
- using PipelinedTimer = std::shared_ptr<impl::PipelinedTimer>
- Handle to a pipelined timer.
Defines
- #define CUBOS_CORE_GL_MAX_FRAMEBUFFER_RENDER_TARGET_COUNT
- Maximum number of render targets that can be set on a framebuffer.
- #define CUBOS_CORE_GL_MAX_TEXTURE_2D_ARRAY_SIZE
- Maximum number of textures on a 2D texture array.
- #define CUBOS_CORE_GL_MAX_CUBEMAP_ARRAY_SIZE
- Maximum number of cube maps on a cubemap array.
- #define CUBOS_CORE_GL_MAX_MIP_LEVEL_COUNT
- Maximum mip level count.
- #define CUBOS_CORE_GL_MAX_CONSTANT_BUFFER_ELEMENT_NAME_SIZE
- Maximum constant buffer element name size.
- #define CUBOS_CORE_GL_MAX_CONSTANT_BUFFER_ELEMENT_COUNT
- Maximum constant buffer element count.
- #define CUBOS_CORE_GL_MAX_VERTEX_ARRAY_ELEMENT_COUNT
- Maximum number of vertex array elements.
- #define CUBOS_CORE_GL_MAX_VERTEX_ARRAY_BUFFER_COUNT
- Maximum number of buffers on a vertex array.
Enum documentation
              enum class Property
              #include <core/gl/render_device.hpp>
            
            Render device properties that can be queried at runtime.
| Enumerators | |
|---|---|
| MaxAnisotropy | Specifies the upper bound of anisotropic filtering. | 
| ComputeSupported | Specifies whether compute shaders and memory barriers are supported (0 or 1). | 
              enum class Usage
              #include <core/gl/render_device.hpp>
            
            Usage mode for buffers and textures.
              enum class Type
              #include <core/gl/render_device.hpp>
            
            Data type.
| Enumerators | |
|---|---|
| Byte | 8 bits signed integer. | 
| Short | 16 bits signed integer. | 
| Int | 32 bits signed integer. | 
| UByte | 8 bits unsigned integer. | 
| UShort | 16 bits unsigned integer. | 
| UInt | 32 bits unsigned integer. | 
| NByte | Normalized 8 bits signed integer. | 
| NShort | Normalized 16 bits signed integer. | 
| NUByte | Normalized 8 bits unsigned integer. | 
| NUShort | Normalized 16 bits unsigned integer. | 
| Float | 32 bits floating point. | 
              enum class IndexFormat
              #include <core/gl/render_device.hpp>
            
            Index format.
| Enumerators | |
|---|---|
| UShort | 16 bits unsigned integer. | 
| UInt | 32 bits unsigned integer. | 
              enum class TextureFormat
              #include <core/gl/render_device.hpp>
            
            Texture format.
| Enumerators | |
|---|---|
| R8SNorm | 1 channel 8 bits normalized signed integer. | 
| RG8SNorm | 2 channel 8 bits normalized signed integer. | 
| RGBA8SNorm | 4 channel 8 bits normalized signed integer. | 
| R8UNorm | 1 channel 8 bits normalized unsigned integer. | 
| R16UNorm | 1 channel 16 bits normalized unsigned integer. | 
| RG8UNorm | 2 channel 8 bits normalized unsigned integer. | 
| RG16UNorm | 2 channel 16 bits normalized unsigned integer. | 
| RGBA8UNorm | 4 channel 8 bits normalized unsigned integer. | 
| RGBA16UNorm | 4 channel 16 bits normalized unsigned integer. | 
| R8SInt | 1 channel 8 bits signed integer. | 
| R16SInt | 1 channel 16 bits signed integer. | 
| RG8SInt | 2 channel 8 bits signed integer. | 
| RG16SInt | 2 channel 16 bits signed integer. | 
| RGBA8SInt | 4 channel 8 bits signed integer. | 
| RGBA16SInt | 4 channel 16 bits signed integer. | 
| R8UInt | 1 channel 8 bits unsigned integer. | 
| R16UInt | 1 channel 16 bits unsigned integer. | 
| RG8UInt | 2 channel 8 bits unsigned integer. | 
| RG16UInt | 2 channel 16 bits unsigned integer. | 
| RGBA8UInt | 4 channel 8 bits unsigned integer. | 
| RGBA16UInt | 4 channel 16 bits unsigned integer. | 
| R16Float | 1 channel 16 bits floating point. | 
| R32Float | 1 channel 32 bits floating point. | 
| RG16Float | 2 channel 16 bits floating point. | 
| RG32Float | 2 channel 32 bits floating point. | 
| RGB16Float | 3 channel 16 bits floating point. | 
| RGB32Float | 3 channel 32 bits floating point. | 
| RGBA16Float | 4 channel 16 bits floating point. | 
| RGBA32Float | 4 channel 32 bits floating point. | 
| Depth16 | 16 depth bits. | 
| Depth32 | 32 depth bits. | 
| Depth24Stencil8 | 24 depth bits and 8 stencil bits. | 
| Depth32Stencil8 | 32 depth bits and 8 stencil bits. | 
              enum class AddressMode
              #include <core/gl/render_device.hpp>
            
            Texture address mode.
              enum class TextureFilter
              #include <core/gl/render_device.hpp>
            
            Texture filter type.
              enum class Winding
              #include <core/gl/render_device.hpp>
            
            Triangle winding mode.
| Enumerators | |
|---|---|
| CW | Clockwise. | 
| CCW | Counterclockwise. | 
              enum class Face
              #include <core/gl/render_device.hpp>
            
            Specifies a face.
              enum class Compare
              #include <core/gl/render_device.hpp>
            
            Comparison function.
              enum class StencilAction
              #include <core/gl/render_device.hpp>
            
            Stencil action.
              enum class BlendFactor
              #include <core/gl/render_device.hpp>
            
            Blend factor.
              enum class BlendOp
              #include <core/gl/render_device.hpp>
            
            Blend operation.
              enum class Stage
              #include <core/gl/render_device.hpp>
            
            Shader stage type.
              enum class CubeFace
              #include <core/gl/render_device.hpp>
            
            Cube map face.
              enum class MemoryBarriers
              #include <core/gl/render_device.hpp>
            
            Memory barrier flags for synchronization.
| Enumerators | |
|---|---|
| None | Utility flag to indicate that no memory barrier is set. | 
| VertexBuffer | If set, data sourced from vertex buffers after the barrier will reflect the data written by shaders prior to the barrier. | 
| IndexBuffer | If set, data sourced from index buffers after the barrier will reflect the data written by shaders prior to the barrier. | 
| ConstantBuffer | If set, data sourced from constant buffers after the barrier will reflect the data written by shaders prior to the barrier. | 
| ImageAccess | If set, memory accesses using shader image load, store, and atomic built-in functions issued after the barrier will reflect the data written by shaders prior to the barrier. | 
| TextureAccess | If set, texture accesses from shaders after the barrier will reflect the data written by shaders prior to the barrier. | 
| Framebuffer | If set, reads and writes via framebuffer objects after the barrier will reflect the data written by shaders prior to the barrier. | 
| All | Utility flag to set all memory barriers. | 
              enum class Access
              #include <core/gl/render_device.hpp>
            
            Access mode for a resource.
| Enumerators | |
|---|---|
| Read | Read access. | 
| Write | Write access. | 
| ReadWrite | Read and write access. | 
Typedef documentation
              using Framebuffer = std::shared_ptr<impl::Framebuffer>
              #include <core/gl/render_device.hpp>
            
            Handle to a framebuffer.
              using RasterState = std::shared_ptr<impl::RasterState>
              #include <core/gl/render_device.hpp>
            
            Handle to a rasterizer state.
              using DepthStencilState = std::shared_ptr<impl::DepthStencilState>
              #include <core/gl/render_device.hpp>
            
            Handle to a depth stencil state.
              using BlendState = std::shared_ptr<impl::BlendState>
              #include <core/gl/render_device.hpp>
            
            Handle to a blend state.
              using PixelPackBuffer = std::shared_ptr<impl::PixelPackBuffer>
              #include <core/gl/render_device.hpp>
            
            Handle to a pixel pack buffer.
              using Sampler = std::shared_ptr<impl::Sampler>
              #include <core/gl/render_device.hpp>
            
            Handle to a sampler.
              using Texture2D = std::shared_ptr<impl::Texture2D>
              #include <core/gl/render_device.hpp>
            
            Handle to a 2D texture.
              using Texture2DArray = std::shared_ptr<impl::Texture2DArray>
              #include <core/gl/render_device.hpp>
            
            Handle to a 2D texture array.
              using Texture3D = std::shared_ptr<impl::Texture3D>
              #include <core/gl/render_device.hpp>
            
            Handle to a 3D texture.
              using CubeMap = std::shared_ptr<impl::CubeMap>
              #include <core/gl/render_device.hpp>
            
            Handle to a cube map.
              using ConstantBuffer = std::shared_ptr<impl::ConstantBuffer>
              #include <core/gl/render_device.hpp>
            
            Handle to a constant buffer.
              using IndexBuffer = std::shared_ptr<impl::IndexBuffer>
              #include <core/gl/render_device.hpp>
            
            Handle to an index buffer.
              using VertexBuffer = std::shared_ptr<impl::VertexBuffer>
              #include <core/gl/render_device.hpp>
            
            Handle to a vertex buffer.
              using VertexArray = std::shared_ptr<impl::VertexArray>
              #include <core/gl/render_device.hpp>
            
            Handle to a vertex array.
              using ShaderStage = std::shared_ptr<impl::ShaderStage>
              #include <core/gl/render_device.hpp>
            
            Handle to a shader stage.
              using ShaderPipeline = std::shared_ptr<impl::ShaderPipeline>
              #include <core/gl/render_device.hpp>
            
            Handle to a shader pipeline.
              using ShaderBindingPoint = impl::ShaderBindingPoint*
              #include <core/gl/render_device.hpp>
            
            Handle to a shader binding point.
              using Timer = std::shared_ptr<impl::Timer>
              #include <core/gl/render_device.hpp>
            
            Handle to a timer.
              using PipelinedTimer = std::shared_ptr<impl::PipelinedTimer>
              #include <core/gl/render_device.hpp>
            
            Handle to a pipelined timer.
Define documentation
              #define CUBOS_CORE_GL_MAX_FRAMEBUFFER_RENDER_TARGET_COUNT
              #include <core/gl/render_device.hpp>
            
            Maximum number of render targets that can be set on a framebuffer.
              #define CUBOS_CORE_GL_MAX_TEXTURE_2D_ARRAY_SIZE
              #include <core/gl/render_device.hpp>
            
            Maximum number of textures on a 2D texture array.
              #define CUBOS_CORE_GL_MAX_CUBEMAP_ARRAY_SIZE
              #include <core/gl/render_device.hpp>
            
            Maximum number of cube maps on a cubemap array.
              #define CUBOS_CORE_GL_MAX_MIP_LEVEL_COUNT
              #include <core/gl/render_device.hpp>
            
            Maximum mip level count.
              #define CUBOS_CORE_GL_MAX_CONSTANT_BUFFER_ELEMENT_NAME_SIZE
              #include <core/gl/render_device.hpp>
            
            Maximum constant buffer element name size.
              #define CUBOS_CORE_GL_MAX_CONSTANT_BUFFER_ELEMENT_COUNT
              #include <core/gl/render_device.hpp>
            
            Maximum constant buffer element count.
              #define CUBOS_CORE_GL_MAX_VERTEX_ARRAY_ELEMENT_COUNT
              #include <core/gl/render_device.hpp>
            
            Maximum number of vertex array elements.
              #define CUBOS_CORE_GL_MAX_VERTEX_ARRAY_BUFFER_COUNT
              #include <core/gl/render_device.hpp>
            
            Maximum number of buffers on a vertex array.