Cocos2d-x
4.0.0
|
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. | |
virtual UniformLocation | getUniformLocation (backend::Uniform name) const override |
Get uniform location by engine built-in uniform enum name. | |
virtual int | getAttributeLocation (const std::string &name) const override |
Get attribute location by attribute name. | |
virtual int | getAttributeLocation (Attribute name) const override |
Get attribute location by engine built-in attribute enum name. | |
virtual ShaderModuleMTL * | getVertexShader () const |
Get vertex shader module. | |
virtual ShaderModuleMTL * | getFragmentShader () const |
Get fragment shader module. | |
const std::unordered_map < std::string, AttributeBindInfo > | getActiveAttributes () const override |
Get active vertex attributes. | |
virtual int | getMaxVertexLocation () const override |
Get maximum vertex location. | |
virtual int | getMaxFragmentLocation () const override |
Get maximum fragment location. | |
virtual std::size_t | getUniformBufferSize (ShaderStage stage) const override |
Get uniform buffer size in bytes that can hold all the uniforms. | |
virtual const UniformInfo & | getActiveUniformInfo (ShaderStage stage, int location) const override |
Get a uniformInfo in given location from the specific shader stage. | |
virtual const std::unordered_map < std::string, UniformInfo > & | getAllActiveUniformInfo (ShaderStage stage) const override |
Get all uniformInfos. | |
Additional Inherited Members | |
![]() | |
const std::string & | getVertexShader () const |
Get vertex shader. | |
const std::string & | getFragmentShader () const |
Get fragment shader. | |
ProgramType | getProgramType () const |
Get engine built-in program type. | |
![]() | |
static Program * | getBuiltinProgram (ProgramType type) |
Get engine built-in program. | |
![]() | |
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 |