|
static Program * | getBuiltinProgram (uint32_t type) |
| Get engine built-in program.
|
|
virtual UniformLocation | getUniformLocation (std::string_view 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 (std::string_view 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 hlookup::string_map< AttributeBindInfo > & | getActiveAttributes () const =0 |
| Get active vertex attributes.
|
|
std::string_view | getVertexShader () const |
| Get vertex shader.
|
|
std::string_view | getFragmentShader () const |
| Get fragment shader.
|
|
void | setupVertexLayout (VertexLayoutType vlt) |
| Sets the program shared vertex layout type, see: VertexLayoutType.
|
|
uint32_t | getProgramType () const |
| Get engine built-in program type.
|
|
uint64_t | getProgramId () const |
| Get program id.
|
|
virtual std::size_t | getUniformBufferSize (ShaderStage stage) const =0 |
| Get uniform buffer size in bytes that can hold all the uniforms.
|
|
virtual const hlookup::string_map< UniformInfo > & | getAllActiveUniformInfo (ShaderStage stage) const =0 |
| Get all uniformInfos.
|
|
#todo: Rename to ProgramStateRegistry
◆ getBuiltinProgram()
static Program * getBuiltinProgram |
( |
uint32_t | type | ) |
|
|
static |
Get engine built-in program.
- Parameters
-
type | Specifies the built-in program type. |
◆ getUniformLocation() [1/2]
virtual UniformLocation getUniformLocation |
( |
std::string_view | 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 |
( |
std::string_view | 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 hlookup::string_map< 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()
std::string_view getVertexShader |
( |
| ) |
const |
|
inline |
Get vertex shader.
- Returns
- Vertex shader.
◆ getFragmentShader()
std::string_view getFragmentShader |
( |
| ) |
const |
|
inline |
Get fragment shader.
@ Fragment shader.
◆ getProgramType()
uint32_t getProgramType |
( |
| ) |
const |
|
inline |
Get engine built-in program type.
- Returns
- The built-in program type.
◆ getProgramId()
uint64_t getProgramId |
( |
| ) |
const |
|
inline |
Get program id.
- Returns
- The program id.
◆ 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.
◆ getAllActiveUniformInfo()
virtual const hlookup::string_map< UniformInfo > & getAllActiveUniformInfo |
( |
ShaderStage | stage | ) |
const |
|
pure virtual |