To Create a vertex or fragment shader.
More...
Inherits ShaderModule.
|
| ShaderModuleMTL (id< MTLDevice > mtlDevice, ShaderStage stage, const std::string &source) |
|
id< MTLFunction > | getMTLFunction () const |
| Get MTLFunction object.
|
|
const UniformInfo & | getActiveUniform (int location) |
| Get current shader uniform informatino.
|
|
const std::unordered_map
< std::string, UniformInfo > & | getAllActiveUniformInfo () const |
| Get all uniformInfos.
|
|
const int | getMaxLocation () const |
| Get maximum uniform location.
|
|
const std::unordered_map
< std::string,
AttributeBindInfo > | getAttributeInfo () const |
| Get active attribute informations.
|
|
int | getUniformLocation (Uniform name) const |
| Get uniform location by engine built-in uniform enum name.
|
|
int | getUniformLocation (const std::string &name) const |
| Get uniform location by name.
|
|
int | getAttributeLocation (Attribute name) const |
| Get attribute location by engine built-in attribute enum name.
|
|
int | getAttributeLocation (std::string name) |
| Get attribute location by attribute name.
|
|
std::size_t | getUniformBufferSize () const |
| Get uniform buffer size in bytes that holds all the uniforms.
|
|
ShaderStage | getShaderStage () const |
| Get shader stage.
|
|
void | retain () |
| Retains the ownership.
|
|
void | release () |
| Releases the ownership immediately.
|
|
Ref * | autorelease () |
| Releases the ownership sometime soon automatically.
|
|
unsigned int | getReferenceCount () const |
| Returns the Ref's current reference count.
|
|
virtual | ~Ref () |
| Destructor.
|
|
|
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 |
|
) |
| |
- Parameters
-
mtlDevice | The device for which MTLFunction object was created. |
stage | Specify what kinds of shader to be created. |
source | Specify the shader source. |
id<MTLFunction> getMTLFunction |
( |
| ) |
const |
|
inline |
Get MTLFunction object.
- Returns
- A MTLFunction object.
const UniformInfo& getActiveUniform |
( |
int |
location | ) |
|
|
inline |
Get current shader uniform informatino.
- Returns
- Uniform information. Key is each uniform name, Value is corresponding uniform info.
const std::unordered_map<std::string, UniformInfo>& getAllActiveUniformInfo |
( |
| ) |
const |
|
inline |
Get all uniformInfos.
- Returns
- The uniformInfos.
const int getMaxLocation |
( |
| ) |
const |
|
inline |
Get maximum uniform location.
- Returns
- Maximum uniform location.
const std::unordered_map<std::string, AttributeBindInfo> getAttributeInfo |
( |
| ) |
const |
|
inline |
Get active attribute informations.
- Returns
- Active attribute informations. key is attribute name and Value is corresponding attribute info.
int getUniformLocation |
( |
Uniform |
name | ) |
const |
Get uniform location by engine built-in uniform enum name.
- Parameters
-
name | Specifies the engine built-in uniform enum name. |
- Returns
- The uniform location.
int getUniformLocation |
( |
const std::string & |
name | ) |
const |
Get uniform location by name.
- Parameters
-
uniform | Specifies the uniform name. |
- Returns
- The uniform location.
int getAttributeLocation |
( |
Attribute |
name | ) |
const |
Get attribute location by engine built-in attribute enum name.
- Parameters
-
name | Specifies the engine built-in attribute enum name. |
- Returns
- The attribute location.
int getAttributeLocation |
( |
std::string |
name | ) |
|
Get attribute location by attribute name.
- Parameters
-
name | Specifies the attribute name. |
- Returns
- The attribute location.
std::size_t getUniformBufferSize |
( |
| ) |
const |
|
inline |
Get uniform buffer size in bytes that holds all the uniforms.
- Returns
- The uniform buffer size.
The documentation for this class was generated from the following file: