Axmol Engine 2.4.0-258ceca
Loading...
Searching...
No Matches
Program Class Referenceabstract

A program. More...

#include <Program.h>

Inherits Object.

Inherited by ProgramGL, and ProgramMTL.

Public Member Functions

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.
 
- Public Member Functions inherited from Object
void retain ()
 Retains the ownership.
 
void release ()
 Releases the ownership immediately.
 
Objectautorelease ()
 Releases the ownership sometime soon automatically.
 
unsigned int getReferenceCount () const
 Returns the Object's current reference count.
 
virtual ~Object ()
 Destructor.
 

Static Public Member Functions

static ProgramgetBuiltinProgram (uint32_t type)
 Get engine built-in program.
 

Additional Inherited Members

- Public Attributes inherited from Object
unsigned int _ID
 object id, ScriptSupport need public _ID
 
int _luaID
 Lua reference id.
 

Detailed Description

A program.


The documentation for this class was generated from the following file: