⚠️ This documentation corresponds to the latest development branch of axmol. It might diverge from the official releases.

Axmol Engine 3.0.0-dff292a
Loading...
Searching...
No Matches
ProgramImpl Class Reference

A metal Program. More...

#include <ProgramMTL.h>

Inherits Program.

Constructor, Destructor and Initializers

 ProgramImpl (std::string_view vertexShader, std::string_view fragmentShader)
UniformLocation getUniformLocation (std::string_view uniform) const override
 Get uniform location by name.
UniformLocation getUniformLocation (rhi::Uniform name) const override
 Get uniform location by engine built-in uniform enum name.
const VertexInputDesc * getVertexInputDesc (std::string_view name) const override
 Get attribute location by attribute name.
const VertexInputDesc * getVertexInputDesc (VertexInputKind name) const override
 Get attribute location by engine built-in attribute enum name.
const tlx::string_map< VertexInputDesc > & getActiveVertexInputs () const override
 Get active vertex attributes.
ShaderModuleImplgetVertexShader () const
 Get vertex shader module.
ShaderModuleImplgetFragmentShader () const
 Get fragment shader module.
int getMaxVertexLocation () const override
 Get maximum vertex location.
int getMaxFragmentLocation () const override
 Get maximum fragment location.
std::size_t getUniformBufferSize (ShaderStage stage) const override
 Get uniform buffer size in bytes that can hold all the uniforms.
const tlx::string_map< UniformInfo > & getActiveUniformInfos (ShaderStage stage) const override
 Get all uniformInfos.

Additional Inherited Members

Public Member Functions inherited from Program
std::string_view getVertexShaderSource () const
 Get vertex shader.
std::string_view getFragmentShaderSource () const
 Get fragment shader.
uint32_t getProgramType () const
 Get engine built-in program type.
uint64_t getProgramId () const
 Get program id.
Public Member Functions inherited from Object
void retain ()
 Retains the ownership.
void release ()
 Releases the ownership immediately.
Objectautorelease ()
 Releases the ownership sometime soon automatically.
unsigned int getReferenceCount () const
 Returns the Object's current reference count.
virtual ~Object ()
 Destructor.
Public Attributes inherited from Object
unsigned int _ID
 object id, ScriptSupport need public _ID
int _luaID
 Lua reference id.

Detailed Description

A metal Program.

Constructor & Destructor Documentation

◆ ProgramImpl()

ProgramImpl ( std::string_view vertexShader,
std::string_view fragmentShader )
Parameters
vertexShaderSpecifes the vertex shader source.
fragmentShaderSpecifes the fragment shader source.

Member Function Documentation

◆ getUniformLocation() [1/2]

UniformLocation getUniformLocation ( std::string_view uniform) const
overridevirtual

Get uniform location by name.

Parameters
uniformSpecifies the uniform name.
Returns
The uniform location.

Implements Program.

◆ getUniformLocation() [2/2]

UniformLocation getUniformLocation ( rhi::Uniform name) const
overridevirtual

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

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

Implements Program.

◆ getVertexInputDesc() [1/2]

const VertexInputDesc * getVertexInputDesc ( std::string_view name) const
overridevirtual

Get attribute location by attribute name.

Parameters
nameSpecifies the attribute name.
Returns
The attribute location.

Implements Program.

◆ getVertexInputDesc() [2/2]

const VertexInputDesc * getVertexInputDesc ( VertexInputKind name) const
overridevirtual

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

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

Implements Program.

◆ getActiveVertexInputs()

const tlx::string_map< VertexInputDesc > & getActiveVertexInputs ( ) const
overridevirtual

Get active vertex attributes.

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

Implements Program.

◆ getVertexShader()

ShaderModuleImpl * getVertexShader ( ) const
inline

Get vertex shader module.

Returns
Vertex shader module.

◆ getFragmentShader()

ShaderModuleImpl * getFragmentShader ( ) const
inline

Get fragment shader module.

@ Fragment shader module.

◆ getMaxVertexLocation()

int getMaxVertexLocation ( ) const
overridevirtual

Get maximum vertex location.

Returns
Maximum vertex locaiton.

Implements Program.

◆ getMaxFragmentLocation()

int getMaxFragmentLocation ( ) const
overridevirtual

Get maximum fragment location.

Returns
Maximum fragment location.

Implements Program.

◆ getUniformBufferSize()

std::size_t getUniformBufferSize ( ShaderStage stage) const
overridevirtual

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.

Implements Program.

◆ getActiveUniformInfos()

const tlx::string_map< UniformInfo > & getActiveUniformInfos ( ShaderStage stage) const
overridevirtual

Get all uniformInfos.

Returns
The uniformInfos.

Implements Program.


The documentation for this class was generated from the following file:
  • ProgramMTL.h