To Create a vertex or fragment shader. More...
Inherits ShaderModule.
Public Member Functions | |
ShaderModuleMTL (id< MTLDevice > mtlDevice, ShaderStage stage, const std::string &source) | |
id< MTLFunction > | getMTLFunction () const |
Get MTLFunction object. More... | |
const UniformInfo & | getActiveUniform (int location) |
Get current shader uniform informatino. More... | |
const std::unordered_map< std::string, UniformInfo > & | getAllActiveUniformInfo () const |
Get all uniformInfos. More... | |
const int | getMaxLocation () const |
Get maximum uniform location. More... | |
const std::unordered_map< std::string, AttributeBindInfo > | getAttributeInfo () const |
Get active attribute informations. More... | |
int | getUniformLocation (Uniform name) const |
Get uniform location by engine built-in uniform enum name. More... | |
int | getUniformLocation (const std::string &name) const |
Get uniform location by name. More... | |
int | getAttributeLocation (Attribute name) const |
Get attribute location by engine built-in attribute enum name. More... | |
int | getAttributeLocation (std::string name) |
Get attribute location by attribute name. More... | |
std::size_t | getUniformBufferSize () const |
Get uniform buffer size in bytes that holds all the uniforms. More... | |
![]() | |
ShaderStage | getShaderStage () const |
Get shader stage. More... | |
![]() | |
void | retain () |
Retains the ownership. More... | |
void | release () |
Releases the ownership immediately. More... | |
Ref * | autorelease () |
Releases the ownership sometime soon automatically. More... | |
unsigned int | getReferenceCount () const |
Returns the Ref's current reference count. More... | |
virtual | ~Ref () |
Destructor. More... | |
Additional Inherited Members | |
![]() | |
unsigned int | _ID |
object id, ScriptSupport need public _ID | |
int | _luaID |
Lua reference id. | |
void * | _scriptObject |
scriptObject, support for swift | |
bool | _rooted |
When true, it means that the object was already rooted. | |
To Create a vertex or fragment shader.
ShaderModuleMTL | ( | id< MTLDevice > | mtlDevice, |
ShaderStage | stage, | ||
const std::string & | source | ||
) |
mtlDevice | The device for which MTLFunction object was created. |
stage | Specify what kinds of shader to be created. |
source | Specify the shader source. |
|
inline |
Get MTLFunction object.
|
inline |
Get current shader uniform informatino.
|
inline |
Get all uniformInfos.
|
inline |
Get maximum uniform location.
|
inline |
Get active attribute informations.
int getUniformLocation | ( | Uniform | name | ) | const |
Get uniform location by engine built-in uniform enum name.
name | Specifies the engine built-in uniform enum name. |
int getUniformLocation | ( | const std::string & | name | ) | const |
Get uniform location by name.
uniform | Specifies the uniform name. |
int getAttributeLocation | ( | Attribute | name | ) | const |
Get attribute location by engine built-in attribute enum name.
name | Specifies the engine built-in attribute enum name. |
int getAttributeLocation | ( | std::string | name | ) |
Get attribute location by attribute name.
name | Specifies the attribute name. |
|
inline |
Get uniform buffer size in bytes that holds all the uniforms.