Inherits Program.
Constructor, Destructor and Initializers | |
| ProgramMTL (const std::string &vertexShader, const std::string &fragmentShader) | |
| virtual | ~ProgramMTL () |
| virtual UniformLocation | getUniformLocation (const std::string &uniform) const override |
| Get uniform location by name. More... | |
| virtual UniformLocation | getUniformLocation (backend::Uniform name) const override |
| Get uniform location by engine built-in uniform enum name. More... | |
| virtual int | getAttributeLocation (const std::string &name) const override |
| Get attribute location by attribute name. More... | |
| virtual int | getAttributeLocation (Attribute name) const override |
| Get attribute location by engine built-in attribute enum name. More... | |
| virtual ShaderModuleMTL * | getVertexShader () const |
| Get vertex shader module. More... | |
| virtual ShaderModuleMTL * | getFragmentShader () const |
| Get fragment shader module. More... | |
| const std::unordered_map< std::string, AttributeBindInfo > | getActiveAttributes () const override |
| Get active vertex attributes. More... | |
| virtual int | getMaxVertexLocation () const override |
| Get maximum vertex location. More... | |
| virtual int | getMaxFragmentLocation () const override |
| Get maximum fragment location. More... | |
| virtual std::size_t | getUniformBufferSize (ShaderStage stage) const override |
| Get uniform buffer size in bytes that can hold all the uniforms. More... | |
| virtual const UniformInfo & | getActiveUniformInfo (ShaderStage stage, int location) const override |
| Get a uniformInfo in given location from the specific shader stage. More... | |
| virtual const std::unordered_map< std::string, UniformInfo > & | getAllActiveUniformInfo (ShaderStage stage) const override |
| Get all uniformInfos. More... | |
Additional Inherited Members | |
Public Member Functions inherited from Program | |
| const std::string & | getVertexShader () const |
| Get vertex shader. More... | |
| const std::string & | getFragmentShader () const |
| Get fragment shader. More... | |
| ProgramType | getProgramType () const |
| Get engine built-in program type. More... | |
Public Member Functions inherited from Ref | |
| 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... | |
Static Public Member Functions inherited from Program | |
| static Program * | getBuiltinProgram (ProgramType type) |
| Get engine built-in program. More... | |
Public Attributes inherited from Ref | |
| 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. | |
A metal Program.
| ProgramMTL | ( | const std::string & | vertexShader, |
| const std::string & | fragmentShader | ||
| ) |
| vertexShader | Specifes the vertex shader source. |
| fragmentShader | Specifes the fragment shader source. |
|
overridevirtual |
Get uniform location by name.
| uniform | Specifies the uniform name. |
Implements Program.
|
overridevirtual |
Get uniform location by engine built-in uniform enum name.
| name | Specifies the engine built-in uniform enum name. |
Implements Program.
|
overridevirtual |
Get attribute location by attribute name.
| name | Specifies the attribute name. |
Implements Program.
|
overridevirtual |
Get attribute location by engine built-in attribute enum name.
| name | Specifies the engine built-in attribute enum name. |
Implements Program.
|
inlinevirtual |
Get vertex shader module.
|
inlinevirtual |
Get fragment shader module.
@ Fragment shader module.
|
overridevirtual |
Get active vertex attributes.
Implements Program.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Get uniform buffer size in bytes that can hold all the uniforms.
| stage | Specifies the shader stage. The symbolic constant can be either VERTEX or FRAGMENT. |
Implements Program.
|
overridevirtual |
Get a uniformInfo in given location from the specific shader stage.
| stage | Specifies the shader stage. The symbolic constant can be either VERTEX or FRAGMENT. |
| location | Specifies the uniform locaion. |
Implements Program.
|
overridevirtual |