Rasterfarm-SDK
|
#include <program.h>
Public Attributes | |
HeapArray< AttributeLocation > | attributeLocation |
HeapArray< VaryingLocation > | varyingLocation |
StringLocation | attributeHandle |
StringLocation | uniformHandle |
StringLocation | varyingHandle |
AttributeEnabled | attributeEnabled |
Static Public Attributes | |
static const String | shaderVersionString |
static const String | shaderMainStartString |
static const String | fragmentColorString |
static const String | fragnentShaderHeaderString |
static const String | vertexPositionString |
static const String | texture2DSamplerString |
static const String | textureCubeSamplerString |
static const String | projectionSamplerString |
Friends | |
class | Application |
class | RenderBuffer |
class | GraphicsPipeline |
typedef UnorderedMap< AttributeLocation, bool > Program::AttributeEnabled |
typedef Handle Program::AttributeLocation |
typedef UnorderedMap< UniformBinding, UniformDescriptorType > Program::BindingDescriptorTypeMap |
typedef UnorderedMap< UniformBinding, float > Program::BindingFloatMap |
typedef UnorderedMap< UniformBinding, float > Program::BindingFloatPointerMap |
typedef UnorderedMap< UniformBinding, int > Program::BindingIntMap |
typedef UnorderedMap< UniformBinding, int > Program::BindingIntPointerMap |
typedef UnorderedMap< UniformBinding, HeapArray< Matrix3f > > Program::BindingMatrix3fArrayMap |
typedef UnorderedMap< UniformBinding, HeapArray< Matrix4f > > Program::BindingMatrix4fArrayMap |
typedef UnorderedMap< UniformBinding, Uniform * > Program::BindingUniformMap |
typedef UnorderedMap< UniformBinding, Vector2fArray > Program::BindingVector2fArrayMap |
typedef UnorderedMap< UniformBinding, Vector3fArray > Program::BindingVector3fArrayMap |
typedef UnorderedMap< UniformBinding, Vector4fArray > Program::BindingVector4fArrayMap |
typedef UnorderedMap< AttributeLocation, AttributeBuffer * > Program::LocationAttributeBufferMap |
typedef UnorderedMap< String, Handle > Program::StringLocation |
typedef Handle Program::UniformBinding |
typedef Handle Program::VaryingLocation |
enum Program::Errors |
Program::Program | ( | ) |
|
virtual |
void Program::addEnableState | ( | PipelineState | state | ) |
void Program::addGlobalAttribute | ( | const String & | typeString, |
const String & | location ) |
void Program::addGlobalSampler | ( | const String & | typeString, |
const String & | binding ) |
void Program::addGlobalUniform | ( | const String & | typeString, |
const String & | binding, | ||
ShaderType | type ) |
void Program::addGlobalVarying | ( | const String & | typeString, |
const String & | location ) |
void Program::addUniformBuffer1f | ( | UniformBinding | binding, |
float * | pValue, | ||
uint | count = 1 ) |
void Program::addUniformBuffer1i | ( | UniformBinding | binding, |
int * | pValue, | ||
uint | count = 1 ) |
void Program::addUniformBuffer2f | ( | UniformBinding | binding, |
float * | pArray, | ||
uint | count = 1 ) |
void Program::addUniformBuffer3f | ( | UniformBinding | binding, |
float * | pArray, | ||
uint | count = 1 ) |
void Program::addUniformBuffer4f | ( | UniformBinding | binding, |
float * | pArray, | ||
uint | count = 1 ) |
void Program::addUniformMatrix3f | ( | UniformBinding | binding, |
Matrix3f * | pMatrix = nullptr, | ||
uint | count = 1 ) |
void Program::addUniformMatrix4f | ( | UniformBinding | binding, |
Matrix4f * | pMatrix = nullptr, | ||
uint | count = 1 ) |
void Program::addUniformSampler2D | ( | UniformBinding | binding, |
Texture * | pTexture, | ||
TextureType | textureType = QUAD_MAP ) |
void Program::addUniformSampler2D | ( | UniformBinding | binding, |
TextureUnit | textureUnit, | ||
TextureType | textureType = QUAD_MAP ) |
void Program::addUniformValue1f | ( | UniformBinding | binding, |
float | value ) |
void Program::addUniformValue1i | ( | UniformBinding | binding, |
int | value ) |
void Program::bindAttributeBuffers | ( | ) |
void Program::create | ( | const HeapArray< Shader * > & | pShader | ) |
void Program::disable | ( | ) |
Disable this program for rendering.
void Program::enable | ( | ) |
Enable this program for rendering.
AttributeLocation Program::getAttributeLocation | ( | const String & | str | ) |
Gets the shader attribute for this glsl program.
index | The index of the attribute. NOTE: Each index is defined by shaderenums.h |
|
inline |
|
inline |
|
inline |
|
inline |
Gets the gpu-program handle for this object.
Shader * Program::getShader | ( | ShaderType | shaderType | ) |
HeapArray< Shader * > Program::getShaders | ( | ) |
UniformBinding Program::getUniformBinding | ( | const String & | str | ) |
bool Program::hasEnableState | ( | PipelineState | state | ) |
bool Program::hasGlobalAttribute | ( | const String & | location | ) |
bool Program::hasGlobalAttribute | ( | const String & | typeString, |
const String & | location ) |
bool Program::hasGlobalUniform | ( | const String & | location, |
ShaderType | type ) |
bool Program::hasGlobalVarying | ( | const String & | location | ) |
bool Program::hasShader | ( | ShaderType | shaderType | ) |
bool Program::hasUniformBuffer | ( | UniformBinding | binding | ) |
|
virtual |
This can only be called 1X.
Reimplemented in ShadowMap::ShadowMaterial, and Surface::Material.
|
inline |
void Program::removeEnableState | ( | PipelineState | state | ) |
void Program::setBlend | ( | ) |
void Program::setBlendFactors | ( | BlendFactor | sBlendFactor, |
BlendFactor | dBlendFactor ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void Program::setStates | ( | ) |
void Program::setStencilComparisonArgs | ( | CompareOperation | stencilTestFunction, |
int | stencilComparisonValue, | ||
Handle | stencilComparisonMask ) |
void Program::setStencilOperationArgs | ( | StencilOperation | stencilOperationFail, |
StencilOperation | stencilOperationDepthFail, | ||
StencilOperation | stencilOperationDepthPass ) |
void Program::setTransparent | ( | bool | transparent = true | ) |
Inform the engine that this object is transparent and should be handled as such. The renderer can only provide transparency for an object within the scene if both blend and depth-test functionality is enabled. NOTE: This method if set true will remove cull-facing if enabled prior and won't restore it if you set it back to false.
|
inline |
void Program::setUniformBuffer1f | ( | UniformBinding | location, |
float * | pBuffer ) |
void Program::setUniformBuffer2f | ( | UniformBinding | binding, |
float * | pArray ) |
void Program::setUniformBuffer3f | ( | UniformBinding | binding, |
float * | pArray ) |
void Program::setUniformBuffer4f | ( | UniformBinding | binding, |
float * | pArray ) |
void Program::setUniformMatrix4f | ( | UniformBinding | binding, |
Matrix4f * | pMatrix ) |
void Program::setUniformSampler2D | ( | UniformBinding | binding, |
Texture * | pTexture, | ||
TextureType | textureType ) |
void Program::setUniformValue1f | ( | UniformBinding | location, |
float | value ) |
void Program::setUniformValue1i | ( | UniformBinding | location, |
int | value ) |
void Program::submit | ( | ElementBuffer * | pElementBuffer | ) |
void Program::submitUniforms | ( | ) |
void Program::update | ( | ) |
void Program::updateUniformMatrix3f | ( | UniformBinding | location, |
int | count, | ||
float * | pBuffer ) |
void Program::updateUniformMatrix4f | ( | UniformBinding | location, |
int | count, | ||
float * | pBuffer ) |
void Program::updateUniformPointer1f | ( | UniformBinding | location, |
int | count, | ||
float * | pBuffer ) |
void Program::updateUniformPointer1i | ( | UniformBinding | location, |
int | count, | ||
int * | pBuffer ) |
void Program::updateUniformPointer2f | ( | UniformBinding | location, |
int | count, | ||
float * | pBuffer ) |
void Program::updateUniformPointer3f | ( | UniformBinding | location, |
int | count, | ||
float * | pBuffer ) |
void Program::updateUniformPointer4f | ( | UniformBinding | location, |
int | count, | ||
float * | pBuffer ) |
void Program::updateUniformValue1f | ( | UniformBinding | binding, |
float | value ) |
void Program::updateUniformValue1i | ( | UniformBinding | binding, |
int | value ) |
|
friend |
|
friend |
|
friend |
AttributeEnabled Program::attributeEnabled |
StringLocation Program::attributeHandle |
HeapArray< AttributeLocation > Program::attributeLocation |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
This is the fragement-color binding-string for the fragment-shader output. This could either be defined by the driver, or user if multiple color-attachement binding-points exist.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
|
protected |
|
protected |
|
protected |
|
static |
|
static |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
|
static |
|
protected |
|
protected |
The order of which triangel vertices should be drawn. This is also reffered to as "triangle winding" order.
StringLocation Program::uniformHandle |
|
protected |
Supported if extension is available or GLESv3 is the API.
StringLocation Program::varyingHandle |
HeapArray< VaryingLocation > Program::varyingLocation |
|
protected |
|
static |
This is the binding-string for the vertex-shader input. Typically this would be defined by the driver.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |