A program.
More...
Inherits Ref.
Inherited by ProgramGL, and ProgramMTL.
|
virtual UniformLocation | getUniformLocation (const std::string &uniform) const =0 |
| Get uniform location by name.
|
|
virtual UniformLocation | getUniformLocation (backend::Uniform name) const =0 |
| Get uniform location by engine built-in uniform enum name.
|
|
virtual int | getAttributeLocation (const std::string &name) const =0 |
| Get attribute location by attribute name.
|
|
virtual int | getAttributeLocation (backend::Attribute name) const =0 |
| Get attribute location by engine built-in attribute enum name.
|
|
virtual int | getMaxVertexLocation () const =0 |
| Get maximum vertex location.
|
|
virtual int | getMaxFragmentLocation () const =0 |
| Get maximum fragment location.
|
|
virtual const
std::unordered_map
< std::string,
AttributeBindInfo > | getActiveAttributes () const =0 |
| Get active vertex attributes.
|
|
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.
|
|
virtual std::size_t | getUniformBufferSize (ShaderStage stage) const =0 |
| Get uniform buffer size in bytes that can hold all the uniforms.
|
|
virtual const UniformInfo & | getActiveUniformInfo (ShaderStage stage, int location) const =0 |
| Get a uniformInfo in given location from the specific shader stage.
|
|
virtual const
std::unordered_map
< std::string, UniformInfo > & | getAllActiveUniformInfo (ShaderStage stage) const =0 |
| Get all uniformInfos.
|
|
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.
|
|
static Program* getBuiltinProgram |
( |
ProgramType |
type | ) |
|
|
static |
Get engine built-in program.
- Parameters
-
type | Specifies the built-in program type. |
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.
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.
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.
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.
virtual int getMaxVertexLocation |
( |
| ) |
const |
|
pure virtual |
Get maximum vertex location.
- Returns
- Maximum vertex locaiton.
Implemented in ProgramGL, and ProgramMTL.
virtual int getMaxFragmentLocation |
( |
| ) |
const |
|
pure virtual |
Get maximum fragment location.
- Returns
- Maximum fragment location.
Implemented in ProgramGL, and ProgramMTL.
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.
const std::string& getVertexShader |
( |
| ) |
const |
|
inline |
Get vertex shader.
- Returns
- Vertex shader.
const std::string& getFragmentShader |
( |
| ) |
const |
|
inline |
Get fragment shader.
@ Fragment shader.
ProgramType getProgramType |
( |
| ) |
const |
|
inline |
Get engine built-in program type.
- Returns
- The built-in program type.
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.
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.
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: