Axmol Engine 2.4.0-258ceca
Loading...
Searching...
No Matches
_backend

Classes

class  Buffer
 Used to store vertex and index data data. More...
 
class  CommandBuffer
 Store encoded commands for the GPU to execute. More...
 
struct  StencilDescriptor
 Stencil descriptor. More...
 
struct  DepthStencilDescriptor
 Depth and stencil descriptor. More...
 
class  DepthStencilState
 Store Depth and stencil status. More...
 
class  DriverBase
 New or create resources from DriverBase. More...
 
class  Program
 A program. More...
 
class  ProgramManager
 Cache and reuse program object. More...
 
struct  RenderPassDescriptor
 Store values about color, depth and stencil attachment. More...
 
class  RenderPipeline
 Render pipeline. More...
 
class  ShaderCache
 Create and reuse shader module. More...
 
class  ShaderModule
 Create shader. More...
 
struct  TextureDescriptor
 Store texture description. More...
 
class  TextureBackend
 A base texture. More...
 
class  Texture2DBackend
 A 2D texture. More...
 
class  TextureCubemapBackend
 A cubemap texture. More...
 
class  VertexLayout
 Store vertex attribute layout. More...
 

Functions

static ProgramgetBuiltinProgram (uint32_t type)
 Get engine built-in program.
 
virtual UniformLocation getUniformLocation (std::string_view uniform) const =0
 Get uniform location by name.
 
virtual UniformLocation getUniformLocation (backend::Uniform name) const =0
 Get uniform location by engine built-in uniform enum name.
 
virtual int getAttributeLocation (std::string_view name) const =0
 Get attribute location by attribute name.
 
virtual int getAttributeLocation (backend::Attribute name) const =0
 Get attribute location by engine built-in attribute enum name.
 
virtual int getMaxVertexLocation () const =0
 Get maximum vertex location.
 
virtual int getMaxFragmentLocation () const =0
 Get maximum fragment location.
 
virtual const hlookup::string_map< AttributeBindInfo > & getActiveAttributes () const =0
 Get active vertex attributes.
 
std::string_view getVertexShader () const
 Get vertex shader.
 
std::string_view getFragmentShader () const
 Get fragment shader.
 
void setupVertexLayout (VertexLayoutType vlt)
 Sets the program shared vertex layout type, see: VertexLayoutType.
 
uint32_t getProgramType () const
 Get engine built-in program type.
 
uint64_t getProgramId () const
 Get program id.
 
virtual std::size_t getUniformBufferSize (ShaderStage stage) const =0
 Get uniform buffer size in bytes that can hold all the uniforms.
 
virtual const hlookup::string_map< UniformInfo > & getAllActiveUniformInfo (ShaderStage stage) const =0
 Get all uniformInfos.
 

Detailed Description

#todo: Rename to ProgramStateRegistry

Function Documentation

◆ getBuiltinProgram()

static Program * getBuiltinProgram ( uint32_t type)
static

Get engine built-in program.

Parameters
typeSpecifies the built-in program type.

◆ getUniformLocation() [1/2]

virtual UniformLocation getUniformLocation ( std::string_view uniform) const
pure virtual

Get uniform location by name.

Parameters
uniformSpecifies the uniform name.
Returns
The uniform location.

Implemented in ProgramGL, and ProgramMTL.

◆ getUniformLocation() [2/2]

virtual UniformLocation getUniformLocation ( backend::Uniform name) const
pure virtual

Get uniform location by engine built-in uniform enum name.

Parameters
nameSpecifies the engine built-in uniform enum name.
Returns
The uniform location.

Implemented in ProgramGL, and ProgramMTL.

◆ getAttributeLocation() [1/2]

virtual int getAttributeLocation ( std::string_view name) const
pure virtual

Get attribute location by attribute name.

Parameters
nameSpecifies the attribute name.
Returns
The attribute location.

Implemented in ProgramGL, and ProgramMTL.

◆ getAttributeLocation() [2/2]

virtual int getAttributeLocation ( backend::Attribute name) const
pure virtual

Get attribute location by engine built-in attribute enum name.

Parameters
nameSpecifies the engine built-in attribute enum name.
Returns
The attribute location.

Implemented in ProgramGL, and ProgramMTL.

◆ getMaxVertexLocation()

virtual int getMaxVertexLocation ( ) const
pure virtual

Get maximum vertex location.

Returns
Maximum vertex locaiton.

Implemented in ProgramGL, and ProgramMTL.

◆ getMaxFragmentLocation()

virtual int getMaxFragmentLocation ( ) const
pure virtual

Get maximum fragment location.

Returns
Maximum fragment location.

Implemented in ProgramGL, and ProgramMTL.

◆ getActiveAttributes()

virtual const hlookup::string_map< AttributeBindInfo > & getActiveAttributes ( ) const
pure virtual

Get active vertex attributes.

Returns
Active vertex attributes. key is active attribute name, Value is corresponding attribute info.

Implemented in ProgramGL, and ProgramMTL.

◆ getVertexShader()

std::string_view getVertexShader ( ) const
inline

Get vertex shader.

Returns
Vertex shader.

◆ getFragmentShader()

std::string_view getFragmentShader ( ) const
inline

Get fragment shader.

@ Fragment shader.

◆ getProgramType()

uint32_t getProgramType ( ) const
inline

Get engine built-in program type.

Returns
The built-in program type.

◆ getProgramId()

uint64_t getProgramId ( ) const
inline

Get program id.

Returns
The program id.

◆ getUniformBufferSize()

virtual std::size_t getUniformBufferSize ( ShaderStage stage) const
pure virtual

Get uniform buffer size in bytes that can hold all the uniforms.

Parameters
stageSpecifies the shader stage. The symbolic constant can be either VERTEX or FRAGMENT.
Returns
The uniform buffer size in bytes.

Implemented in ProgramGL, and ProgramMTL.

◆ getAllActiveUniformInfo()

virtual const hlookup::string_map< UniformInfo > & getAllActiveUniformInfo ( ShaderStage stage) const
pure virtual

Get all uniformInfos.

Returns
The uniformInfos.

Implemented in ProgramGL, and ProgramMTL.