OGLProgramParamValues (object)

The OGLProgramParamValues stores values required for drawing an OpenGL primitive, for a specific OGLProgram.

The stored values include uniform, textures, attributes and element arrays (contained in the OGLVertexArray “vertexAttribs” member).

Additionally, it supports chaining of shared OGLProgramParamValues. If a value is not stored in this object, it will use the source shared values if it exists (“sharedValues” member). The shared values can even have a distinct OGLProgram, in which case these will be matched by name.

See RTRDrawInstance and material parameters for an example of chained OGLProgramParamValues parameters.

Note: value version = any parameter value change, structure version = different set of stored parameters

OGLProgramParamValues OGLProgramParamValues OGLProgramParamValues BaseVersioned BaseVersioned OGLProgramParamValues->BaseVersioned StatisticSourceWithAutoRegisterMember StatisticSourceWithAutoRegisterMember OGLProgramParamValues->StatisticSourceWithAutoRegisterMember Versioned Versioned BaseVersioned->Versioned

Members

Versions version  
OGLProgram program  
OGLProgramParamValues sharedValues  
Ref<OGLProgram> sharedValuesMaterial  
Boolean sharedValuesHasSameProgram  
UInt32 sharedValuesLastVersion  
UInt32 sharedValuesLastStructureVersion  
UInt32 sharedValuesLastSelfStructureVersion  
Boolean usesSharedValues  
OGLVertexArray vertexAttribs  
Boolean vertexAttribsAreShared  
UInt32 sharedVertexAttribsLastVersion  
Boolean usesSharedAttribs  
UInt32[] packedUniformValueData  
UInt32 packedUniformValueDataEnd  
OGLProgramParamValues_param[] paramsData  
UInt32 paramsDataEnd  
StatisticsAutoRegisterMember autoStats  
Boolean tracingParamValues  

Methods

  OGLProgramParamValues ( in OGLProgramParamValues other )
  OGLProgramParamValues ()
  activate ! ( io Ref<OGLContext> context )
OGLProgramParamValues clone ? ()
  completeValuesWithSharedOnes ! ()
Color getColorUniform ? ( in Size programParamKey )
Color getColorUniform ? ( in Size programParamKey, in Size arrayIndex )
Mat22 getMat22Uniform ? ( in Size programParamKey )
Mat22 getMat22Uniform ? ( in Size programParamKey, in Size arrayIndex )
Mat33 getMat33Uniform ? ( in Size programParamKey )
Mat33 getMat33Uniform ? ( in Size programParamKey, in Size arrayIndex )
Mat44 getMat44Uniform ? ( in Size programParamKey )
Mat44 getMat44Uniform ? ( in Size programParamKey, in Size arrayIndex )
Ref<Object> getObjectParamValue ? ( in Size programParamKey )
UInt8 getParamStorage ? ( in Size programParamKey )
UInt8 getParamType ? ( in Size programParamKey )
  getParameterData ? ( in Size programParamKey, in Data outStructData, in UInt64 outStructSize, in UInt32 subIndex )
Ref<OGLProgram> getProgram ? ()
SInt32 getSInt32Uniform ? ( in Size programParamKey )
SInt32 getSInt32Uniform ? ( in Size programParamKey, in Size arrayIndex )
Scalar getScalarUniform ? ( in Size programParamKey )
Scalar getScalarUniform ? ( in Size programParamKey, in Size arrayIndex )
  getStoredParameterData ? ( in Size programParamKey, io Data structData, io UInt64 structSizeOrBufferStride, io Object objectValue )
Vec2 getVec2Uniform ? ( in Size programParamKey )
Vec2 getVec2Uniform ? ( in Size programParamKey, in Size arrayIndex )
Vec3 getVec3Uniform ? ( in Size programParamKey )
Vec3 getVec3Uniform ? ( in Size programParamKey, in Size arrayIndex )
Vec4 getVec4Uniform ? ( in Size programParamKey )
Vec4 getVec4Uniform ? ( in Size programParamKey, in Size arrayIndex )
  initialize ! ( in Ref<OGLProgram> program, in Ref<OGLProgramParamValues> sharedValues )
  reset ! ()
  resetToProgramDefault ! ( in Size programParamKey )
  setSharedValues ! ( in Ref<OGLProgramParamValues> sharedValues )
  setTexture ! ( in Size programParamKey, in Ref<OGLTexture> texture )
  setUniform ! ( in Size programParamKey, in Color value )
  setUniform ! ( in Size programParamKey, in Color value, in Size arrayIndex )
  setUniform ! ( in Size programParamKey, in Color values<> )
  setUniform ! ( in Size programParamKey, in Data valueData, in UInt64 valueDataSize )
  setUniform ! ( in Size programParamKey, in Data valueData, in UInt64 valueDataSize, in Boolean transposeIfRequired )
  setUniform ! ( in Size programParamKey, in Mat22 value )
  setUniform ! ( in Size programParamKey, in Mat22 value, in Size arrayIndex )
  setUniform ! ( in Size programParamKey, in Mat22 values<> )
  setUniform ! ( in Size programParamKey, in Mat33 value )
  setUniform ! ( in Size programParamKey, in Mat33 value, in Size arrayIndex )
  setUniform ! ( in Size programParamKey, in Mat33 values<> )
  setUniform ! ( in Size programParamKey, in Mat44 value )
  setUniform ! ( in Size programParamKey, in Mat44 value, in Size arrayIndex )
  setUniform ! ( in Size programParamKey, in Mat44 values<> )
  setUniform ! ( in Size programParamKey, in SInt32 value )
  setUniform ! ( in Size programParamKey, in SInt32 value, in Size arrayIndex )
  setUniform ! ( in Size programParamKey, in SInt32 values<> )
  setUniform ! ( in Size programParamKey, in Scalar value )
  setUniform ! ( in Size programParamKey, in Scalar value, in Size arrayIndex )
  setUniform ! ( in Size programParamKey, in Scalar values<> )
  setUniform ! ( in Size programParamKey, in Vec2 value )
  setUniform ! ( in Size programParamKey, in Vec2 value, in Size arrayIndex )
  setUniform ! ( in Size programParamKey, in Vec2 values<> )
  setUniform ! ( in Size programParamKey, in Vec3 value )
  setUniform ! ( in Size programParamKey, in Vec3 value, in Size arrayIndex )
  setUniform ! ( in Size programParamKey, in Vec3 values<> )
  setUniform ! ( in Size programParamKey, in Vec4 value )
  setUniform ! ( in Size programParamKey, in Vec4 value, in Size arrayIndex )
  setUniform ! ( in Size programParamKey, in Vec4 values<> )
  setUniformToProgramCurrentValue ! ( in Size programParamKey )
  setVertexAttrib ! ( in Size programParamKey, in Ref<OGLBuffer_> buffer )
  setVertexAttrib ! ( in Size programParamKey, in Ref<OGLBuffer_> buffer, in UInt32 stride )
  synchronizeWithBufferVersions ! ()

Methods in detail

OGLProgramParamValues ( in OGLProgramParamValues other )

copy constructor


OGLProgramParamValues ()


OGLProgramParamValues.activate! ( io Ref<OGLContext> context )


OGLProgramParamValues OGLProgramParamValues.clone? ()

clone method


OGLProgramParamValues.completeValuesWithSharedOnes! ()


Color OGLProgramParamValues.getColorUniform? ( in Size programParamKey )


Color OGLProgramParamValues.getColorUniform? ( in Size programParamKey, in Size arrayIndex )


Mat22 OGLProgramParamValues.getMat22Uniform? ( in Size programParamKey )


Mat22 OGLProgramParamValues.getMat22Uniform? ( in Size programParamKey, in Size arrayIndex )


Mat33 OGLProgramParamValues.getMat33Uniform? ( in Size programParamKey )


Mat33 OGLProgramParamValues.getMat33Uniform? ( in Size programParamKey, in Size arrayIndex )


Mat44 OGLProgramParamValues.getMat44Uniform? ( in Size programParamKey )


Mat44 OGLProgramParamValues.getMat44Uniform? ( in Size programParamKey, in Size arrayIndex )


Ref<Object> OGLProgramParamValues.getObjectParamValue? ( in Size programParamKey )

Gets active value (stored or shared or default).


UInt8 OGLProgramParamValues.getParamStorage? ( in Size programParamKey )

Note: this should be called after ‘update’


UInt8 OGLProgramParamValues.getParamType? ( in Size programParamKey )


OGLProgramParamValues.getParameterData? ( in Size programParamKey, in Data outStructData, in UInt64 outStructSize, in UInt32 subIndex )

Generic version, for any type. Gets active value (stored or shared or default).


Ref<OGLProgram> OGLProgramParamValues.getProgram? ()


SInt32 OGLProgramParamValues.getSInt32Uniform? ( in Size programParamKey )


SInt32 OGLProgramParamValues.getSInt32Uniform? ( in Size programParamKey, in Size arrayIndex )


Scalar OGLProgramParamValues.getScalarUniform? ( in Size programParamKey )


Scalar OGLProgramParamValues.getScalarUniform? ( in Size programParamKey, in Size arrayIndex )


OGLProgramParamValues.getStoredParameterData? ( in Size programParamKey, io Data structData, io UInt64 structSizeOrBufferStride, io Object objectValue )

Generic version, for any type. If structData == NULL and objectValue == null: not stored. NOTE: for a vertex attribute (OGLBuffer_), structSize will be set as the ‘stride’


Vec2 OGLProgramParamValues.getVec2Uniform? ( in Size programParamKey )


Vec2 OGLProgramParamValues.getVec2Uniform? ( in Size programParamKey, in Size arrayIndex )


Vec3 OGLProgramParamValues.getVec3Uniform? ( in Size programParamKey )


Vec3 OGLProgramParamValues.getVec3Uniform? ( in Size programParamKey, in Size arrayIndex )


Vec4 OGLProgramParamValues.getVec4Uniform? ( in Size programParamKey )


Vec4 OGLProgramParamValues.getVec4Uniform? ( in Size programParamKey, in Size arrayIndex )


OGLProgramParamValues.initialize! ( in Ref<OGLProgram> program, in Ref<OGLProgramParamValues> sharedValues )


OGLProgramParamValues.reset! ()

Clears all data, but won’t release allocated buffers


OGLProgramParamValues.resetToProgramDefault! ( in Size programParamKey )


OGLProgramParamValues.setSharedValues! ( in Ref<OGLProgramParamValues> sharedValues )


OGLProgramParamValues.setTexture! ( in Size programParamKey, in Ref<OGLTexture> texture )


OGLProgramParamValues.setUniform! ( in Size programParamKey, in Color value )


OGLProgramParamValues.setUniform! ( in Size programParamKey, in Color value, in Size arrayIndex )


OGLProgramParamValues.setUniform! ( in Size programParamKey, in Color values<> )


OGLProgramParamValues.setUniform! ( in Size programParamKey, in Data valueData, in UInt64 valueDataSize )

Generic version, for any type.


OGLProgramParamValues.setUniform! ( in Size programParamKey, in Data valueData, in UInt64 valueDataSize, in Boolean transposeIfRequired )

Generic version, for any type.


OGLProgramParamValues.setUniform! ( in Size programParamKey, in Mat22 value )


OGLProgramParamValues.setUniform! ( in Size programParamKey, in Mat22 value, in Size arrayIndex )


OGLProgramParamValues.setUniform! ( in Size programParamKey, in Mat22 values<> )


OGLProgramParamValues.setUniform! ( in Size programParamKey, in Mat33 value )


OGLProgramParamValues.setUniform! ( in Size programParamKey, in Mat33 value, in Size arrayIndex )


OGLProgramParamValues.setUniform! ( in Size programParamKey, in Mat33 values<> )


OGLProgramParamValues.setUniform! ( in Size programParamKey, in Mat44 value )


OGLProgramParamValues.setUniform! ( in Size programParamKey, in Mat44 value, in Size arrayIndex )


OGLProgramParamValues.setUniform! ( in Size programParamKey, in Mat44 values<> )


OGLProgramParamValues.setUniform! ( in Size programParamKey, in SInt32 value )


OGLProgramParamValues.setUniform! ( in Size programParamKey, in SInt32 value, in Size arrayIndex )


OGLProgramParamValues.setUniform! ( in Size programParamKey, in SInt32 values<> )


OGLProgramParamValues.setUniform! ( in Size programParamKey, in Scalar value )


OGLProgramParamValues.setUniform! ( in Size programParamKey, in Scalar value, in Size arrayIndex )


OGLProgramParamValues.setUniform! ( in Size programParamKey, in Scalar values<> )


OGLProgramParamValues.setUniform! ( in Size programParamKey, in Vec2 value )


OGLProgramParamValues.setUniform! ( in Size programParamKey, in Vec2 value, in Size arrayIndex )


OGLProgramParamValues.setUniform! ( in Size programParamKey, in Vec2 values<> )


OGLProgramParamValues.setUniform! ( in Size programParamKey, in Vec3 value )


OGLProgramParamValues.setUniform! ( in Size programParamKey, in Vec3 value, in Size arrayIndex )


OGLProgramParamValues.setUniform! ( in Size programParamKey, in Vec3 values<> )


OGLProgramParamValues.setUniform! ( in Size programParamKey, in Vec4 value )


OGLProgramParamValues.setUniform! ( in Size programParamKey, in Vec4 value, in Size arrayIndex )


OGLProgramParamValues.setUniform! ( in Size programParamKey, in Vec4 values<> )


OGLProgramParamValues.setUniformToProgramCurrentValue! ( in Size programParamKey )


OGLProgramParamValues.setVertexAttrib! ( in Size programParamKey, in Ref<OGLBuffer_> buffer )


OGLProgramParamValues.setVertexAttrib! ( in Size programParamKey, in Ref<OGLBuffer_> buffer, in UInt32 stride )


OGLProgramParamValues.synchronizeWithBufferVersions! ()