A program.
More...
Inherits Ref.
Inherited by ProgramGL, and ProgramMTL.
|
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.
|
|
◆ getBuiltinProgram()
static Program* getBuiltinProgram |
( |
ProgramType |
type | ) |
|
|
static |
Get engine built-in program.
- Parameters
-
type | Specifies the built-in program type. |
◆ getUniformLocation() [1/2]
virtual UniformLocation getUniformLocation |
( |
const std::string & |
uniform | ) |
const |
|
pure virtual |
Get uniform location by name.
- Parameters
-
uniform | Specifies the uniform name. |
- Returns
- The uniform location.
Implemented in ProgramGL, and ProgramMTL.
◆ getUniformLocation() [2/2]
virtual UniformLocation getUniformLocation |
( |
backend::Uniform |
name | ) |
const |
|
pure virtual |
Get uniform location by engine built-in uniform enum name.
- Parameters
-
name | Specifies the engine built-in uniform enum name. |
- Returns
- The uniform location.
Implemented in ProgramGL, and ProgramMTL.
◆ getAttributeLocation() [1/2]
virtual int getAttributeLocation |
( |
const std::string & |
name | ) |
const |
|
pure virtual |
Get attribute location by attribute name.
- Parameters
-
name | Specifies the attribute name. |
- Returns
- The attribute location.
Implemented in ProgramGL, and ProgramMTL.
◆ getAttributeLocation() [2/2]
virtual int getAttributeLocation |
( |
backend::Attribute |
name | ) |
const |
|
pure virtual |
Get attribute location by engine built-in attribute enum name.
- Parameters
-
name | Specifies the engine built-in attribute enum name. |
- Returns
- The attribute location.
Implemented in ProgramGL, and ProgramMTL.
◆ getMaxVertexLocation()
virtual int getMaxVertexLocation |
( |
| ) |
const |
|
pure virtual |
Get maximum vertex location.
- Returns
- Maximum vertex locaiton.
Implemented in ProgramGL, and ProgramMTL.
◆ getMaxFragmentLocation()
virtual int getMaxFragmentLocation |
( |
| ) |
const |
|
pure virtual |
Get maximum fragment location.
- Returns
- Maximum fragment location.
Implemented in ProgramGL, and ProgramMTL.
◆ getActiveAttributes()
virtual const std::unordered_map<std::string, AttributeBindInfo> getActiveAttributes |
( |
| ) |
const |
|
pure virtual |
Get active vertex attributes.
- Returns
- Active vertex attributes. key is active attribute name, Value is corresponding attribute info.
Implemented in ProgramGL, and ProgramMTL.
◆ getVertexShader()
const std::string& getVertexShader |
( |
| ) |
const |
|
inline |
Get vertex shader.
- Returns
- Vertex shader.
◆ getFragmentShader()
const std::string& getFragmentShader |
( |
| ) |
const |
|
inline |
Get fragment shader.
@ Fragment shader.
◆ getProgramType()
ProgramType getProgramType |
( |
| ) |
const |
|
inline |
Get engine built-in program type.
- Returns
- The built-in program type.
◆ getUniformBufferSize()
virtual std::size_t getUniformBufferSize |
( |
ShaderStage |
stage | ) |
const |
|
pure virtual |
Get uniform buffer size in bytes that can hold all the uniforms.
- Parameters
-
stage | Specifies the shader stage. The symbolic constant can be either VERTEX or FRAGMENT. |
- Returns
- The uniform buffer size in bytes.
Implemented in ProgramGL, and ProgramMTL.
◆ getActiveUniformInfo()
virtual const UniformInfo& getActiveUniformInfo |
( |
ShaderStage |
stage, |
|
|
int |
location |
|
) |
| const |
|
pure virtual |
Get a uniformInfo in given location from the specific shader stage.
- Parameters
-
stage | Specifies the shader stage. The symbolic constant can be either VERTEX or FRAGMENT. |
location | Specifies the uniform locaion. |
- Returns
- The uniformInfo.
Implemented in ProgramGL, and ProgramMTL.
◆ getAllActiveUniformInfo()
virtual const std::unordered_map<std::string, UniformInfo>& getAllActiveUniformInfo |
( |
ShaderStage |
stage | ) |
const |
|
pure virtual |
The documentation for this class was generated from the following file: