OGLProgram (object)

A OGLProgram wraps a GLSL program object.

See Simple material for an overview of and OGLProgram and its extended GLSL preprocessor syntax.

OGLProgram OGLProgram OGLProgram OGLBaseObject OGLBaseObject OGLProgram->OGLBaseObject BaseVersioned BaseVersioned OGLBaseObject->BaseVersioned OGLObject OGLObject OGLBaseObject->OGLObject StatisticSourceWithAutoRegisterMember StatisticSourceWithAutoRegisterMember OGLBaseObject->StatisticSourceWithAutoRegisterMember Versioned Versioned BaseVersioned->Versioned

Members

Versions version  
String name  
UInt32 bufferID  
UInt32 unactiveBufferID  
Boolean externallyOwned  
OGLWrapperGlobals wrapperGlobals  
StatisticsAutoRegisterMember autoStats  
OGLShader_[] shaders  
Integer linkStatus  
String linkLog  
Boolean tracingParamValues  
OGLProgram_param[] params  
UInt32[4] paramCategoryLimits  
UInt32[String] paramToKey  
OGLProgram_outFragment[] outFragments  
UInt32[String] outFragmentToIndex  
UInt32[] paramValueCache  
UInt32[] textureUnitToParamKey  
UInt32 maxAttributeLocation  
Boolean defaultsChanged  

Methods

  OGLProgram ( in OGLProgram other )
  OGLProgram ( in String name )
  OGLProgram ()
  activate ! ( io Ref<OGLContext> context )
  addShader ! ( in OGLShader_ shader )
  addShader ! ( in String code, in Integer glShaderType )
  addShader ! ( in String filePath, in String code, in Integer glShaderType, in String preprocessorIncludePaths<> )
Size addUserParameter ! ( in String name, in UInt32 glType, in UInt32 size, in UInt32 paramCategory )
OGLProgram clone ? ()
Boolean create ! ( io Ref<OGLContext> context )
Boolean createParameters ! ( io Ref<OGLContext> context, in Boolean drawSharedContext )
  declareOutputFragmentName ! ( in String name )
String describe ? ()
  extractParameterInfo ! ( io Ref<OGLContext> context )
  getCurrentParamValue ? ( in Size paramKey, io Data structData, io UInt64 structSize, in UInt32 subIndex )
  getDefaultParamValue ? ( in Size paramKey, io Data structData, io UInt64 structSize, in UInt32 subIndex )
Size getInputParameterCount ? ()
UInt32 getOutputFragmentCount ? ()
UInt32 getOutputFragmentIndex ? ( in String name )
UInt32 getOutputFragmentLocation ? ( in UInt32 index )
String getOutputFragmentName ? ( in UInt32 index )
Size getParamKeyForTextureUnit ? ( in Size unit )
Size getParameterArrayCount ? ( in Size paramKey )
UInt32 getParameterCategory ? ( in Size paramKey )
  getParameterCategoryAndIndex ? ( in Size paramKey, io UInt32 paramCategory, io UInt32 index )
Size getParameterCount ? ( in UInt32 paramCategory )
String getParameterDesc ? ( in UInt32 paramCategory, in UInt32 index )
UInt32 getParameterExpectedTextureType ? ( in Size paramKey, io Boolean shadow )
Integer getParameterGLType ? ( in Size paramKey )
Type getParameterKLType ? ( in Size paramKey )
Size getParameterKey ? ( in String name )
Size getParameterKey ? ( in UInt32 paramCategory, in UInt32 index )
Size getParameterKeyEnd ? ()
Integer getParameterLocation ? ( in Size paramKey )
String getParameterName ? ( in Size paramKey )
Size getParameterTotalWordCount ? ( in Size paramKey )
Size getParameterWordCountPerItem ? ( in Size paramKey )
Size getTextureUnit ? ( in Size paramKey )
Size getTextureUnitCount ? ()
Boolean isUserParameter ? ( in Size paramKey )
  link ! ( in Boolean force, io Ref<OGLContext> context )
  link ! ( io Ref<OGLContext> context )
  loadUniform ! ( in Size paramKey, in Boolean value )
  loadUniform ! ( in Size paramKey, in Color value )
  loadUniform ! ( in Size paramKey, in Color values<> )
  loadUniform ! ( in Size paramKey, in Mat22 value )
  loadUniform ! ( in Size paramKey, in Mat22 values<> )
  loadUniform ! ( in Size paramKey, in Mat33 value )
  loadUniform ! ( in Size paramKey, in Mat33 values<> )
  loadUniform ! ( in Size paramKey, in Mat44 value )
  loadUniform ! ( in Size paramKey, in Mat44 values<> )
  loadUniform ! ( in Size paramKey, in SInt32 value )
  loadUniform ! ( in Size paramKey, in SInt32 values<> )
  loadUniform ! ( in Size paramKey, in Scalar value )
  loadUniform ! ( in Size paramKey, in Scalar values<> )
  loadUniform ! ( in Size paramKey, in UInt32 values<> )
  loadUniform ! ( in Size paramKey, in Vec2 value )
  loadUniform ! ( in Size paramKey, in Vec2 values<> )
  loadUniform ! ( in Size paramKey, in Vec3 value )
  loadUniform ! ( in Size paramKey, in Vec3 values<> )
  loadUniform ! ( in Size paramKey, in Vec4 value )
  loadUniform ! ( in Size paramKey, in Vec4 values<> )
Boolean populateFromGLSLFileGroup ! ( in String directory, in String namePrefix, in String preprocessorIncludePaths<> )
  reportCodeAndMappings ? ()
  resetToDefault ! ( in Size paramKey )
  setDefault ! ( in Size paramKey, in Boolean value )
  setDefault ! ( in Size paramKey, in Color value )
  setDefault ! ( in Size paramKey, in Mat22 value )
  setDefault ! ( in Size paramKey, in Mat33 value )
  setDefault ! ( in Size paramKey, in Mat44 value )
  setDefault ! ( in Size paramKey, in SInt32 value )
  setDefault ! ( in Size paramKey, in Scalar value )
  setDefault ! ( in Size paramKey, in Vec2 value )
  setDefault ! ( in Size paramKey, in Vec3 value )
  setDefault ! ( in Size paramKey, in Vec4 value )
  ~OGLProgram ()

Methods in detail

OGLProgram ( in OGLProgram other )

copy constructor


OGLProgram ( in String name )


OGLProgram ()

default constructor


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


OGLProgram.addShader! ( in OGLShader_ shader )


OGLProgram.addShader! ( in String code, in Integer glShaderType )


OGLProgram.addShader! ( in String filePath, in String code, in Integer glShaderType, in String preprocessorIncludePaths<> )


Size OGLProgram.addUserParameter! ( in String name, in UInt32 glType, in UInt32 size, in UInt32 paramCategory )

Adds a parameter that was not created by program’s compilation (optimized out). This can be useful for propagating value to other program variation which might have it.

paramCategory One of the following: OGLProgram_uniformParam, OGLProgram_attribParam, OGLProgram_fragDataParam


OGLProgram OGLProgram.clone? ()

clone method


Boolean OGLProgram.create! ( io Ref<OGLContext> context )

Returns true if it succeeded. Some Objects can only be created with specialized methods, in which case this will return false.


Boolean OGLProgram.createParameters! ( io Ref<OGLContext> context, in Boolean drawSharedContext )


OGLProgram.declareOutputFragmentName! ( in String name )


String OGLProgram.describe? ()


OGLProgram.extractParameterInfo! ( io Ref<OGLContext> context )


OGLProgram.getCurrentParamValue? ( in Size paramKey, io Data structData, io UInt64 structSize, in UInt32 subIndex )


OGLProgram.getDefaultParamValue? ( in Size paramKey, io Data structData, io UInt64 structSize, in UInt32 subIndex )


Size OGLProgram.getInputParameterCount? ()


UInt32 OGLProgram.getOutputFragmentCount? ()


UInt32 OGLProgram.getOutputFragmentIndex? ( in String name )


UInt32 OGLProgram.getOutputFragmentLocation? ( in UInt32 index )


String OGLProgram.getOutputFragmentName? ( in UInt32 index )


Size OGLProgram.getParamKeyForTextureUnit? ( in Size unit )


Size OGLProgram.getParameterArrayCount? ( in Size paramKey )


UInt32 OGLProgram.getParameterCategory? ( in Size paramKey )


OGLProgram.getParameterCategoryAndIndex? ( in Size paramKey, io UInt32 paramCategory, io UInt32 index )

paramCategory One of the following: OGLProgram_uniformParam, OGLProgram_attribParam, OGLProgram_fragDataParam
index Index within that parameter category.


Size OGLProgram.getParameterCount? ( in UInt32 paramCategory )

paramCategory OGLProgram[x]:ref:Param <param> constant


String OGLProgram.getParameterDesc? ( in UInt32 paramCategory, in UInt32 index )

paramCategory OGLProgram[x]:ref:Param <param> constant


UInt32 OGLProgram.getParameterExpectedTextureType? ( in Size paramKey, io Boolean shadow )


Integer OGLProgram.getParameterGLType? ( in Size paramKey )


Type OGLProgram.getParameterKLType? ( in Size paramKey )

Will return None if no direct match (use OGLProgram.getParameterGLType)


Size OGLProgram.getParameterKey? ( in String name )

Gets a parameter key from a parameter name. Returns ‘InvalidIndex’ if not found.


Size OGLProgram.getParameterKey? ( in UInt32 paramCategory, in UInt32 index )


Size OGLProgram.getParameterKeyEnd? ()


Integer OGLProgram.getParameterLocation? ( in Size paramKey )


String OGLProgram.getParameterName? ( in Size paramKey )


Size OGLProgram.getParameterTotalWordCount? ( in Size paramKey )


Size OGLProgram.getParameterWordCountPerItem? ( in Size paramKey )


Size OGLProgram.getTextureUnit? ( in Size paramKey )


Size OGLProgram.getTextureUnitCount? ()


Boolean OGLProgram.isUserParameter? ( in Size paramKey )


OGLProgram.link! ( in Boolean force, io Ref<OGLContext> context )


OGLProgram.link! ( io Ref<OGLContext> context )


OGLProgram.loadUniform! ( in Size paramKey, in Boolean value )

注釈

We assume that OGLProgram.activate() was previously called


OGLProgram.loadUniform! ( in Size paramKey, in Color value )

注釈

We assume that OGLProgram.activate() was previously called


OGLProgram.loadUniform! ( in Size paramKey, in Color values<> )

注釈

We assume that OGLProgram.activate() was previously called


OGLProgram.loadUniform! ( in Size paramKey, in Mat22 value )

注釈

We assume that OGLProgram.activate() was previously called


OGLProgram.loadUniform! ( in Size paramKey, in Mat22 values<> )

注釈

We assume that OGLProgram.activate() was previously called


OGLProgram.loadUniform! ( in Size paramKey, in Mat33 value )

注釈

We assume that OGLProgram.activate() was previously called


OGLProgram.loadUniform! ( in Size paramKey, in Mat33 values<> )

注釈

We assume that OGLProgram.activate() was previously called


OGLProgram.loadUniform! ( in Size paramKey, in Mat44 value )

注釈

We assume that OGLProgram.activate() was previously called


OGLProgram.loadUniform! ( in Size paramKey, in Mat44 values<> )

注釈

We assume that OGLProgram.activate() was previously called


OGLProgram.loadUniform! ( in Size paramKey, in SInt32 value )

注釈

We assume that OGLProgram.activate() was previously called


OGLProgram.loadUniform! ( in Size paramKey, in SInt32 values<> )

注釈

We assume that OGLProgram.activate() was previously called


OGLProgram.loadUniform! ( in Size paramKey, in Scalar value )

注釈

We assume that OGLProgram.activate() was previously called


OGLProgram.loadUniform! ( in Size paramKey, in Scalar values<> )

注釈

We assume that OGLProgram.activate() was previously called


OGLProgram.loadUniform! ( in Size paramKey, in UInt32 values<> )

注釈

We assume that OGLProgram.activate() was previously called


OGLProgram.loadUniform! ( in Size paramKey, in Vec2 value )

注釈

We assume that OGLProgram.activate() was previously called


OGLProgram.loadUniform! ( in Size paramKey, in Vec2 values<> )

注釈

We assume that OGLProgram.activate() was previously called


OGLProgram.loadUniform! ( in Size paramKey, in Vec3 value )

注釈

We assume that OGLProgram.activate() was previously called


OGLProgram.loadUniform! ( in Size paramKey, in Vec3 values<> )

注釈

We assume that OGLProgram.activate() was previously called


OGLProgram.loadUniform! ( in Size paramKey, in Vec4 value )

注釈

We assume that OGLProgram.activate() was previously called


OGLProgram.loadUniform! ( in Size paramKey, in Vec4 values<> )

注釈

We assume that OGLProgram.activate() was previously called


Boolean OGLProgram.populateFromGLSLFileGroup! ( in String directory, in String namePrefix, in String preprocessorIncludePaths<> )

Open a group of files following this name convention: directory/[namePrefix]_[shaderType].glsl


OGLProgram.reportCodeAndMappings? ()


OGLProgram.resetToDefault! ( in Size paramKey )


OGLProgram.setDefault! ( in Size paramKey, in Boolean value )


OGLProgram.setDefault! ( in Size paramKey, in Color value )


OGLProgram.setDefault! ( in Size paramKey, in Mat22 value )


OGLProgram.setDefault! ( in Size paramKey, in Mat33 value )


OGLProgram.setDefault! ( in Size paramKey, in Mat44 value )


OGLProgram.setDefault! ( in Size paramKey, in SInt32 value )


OGLProgram.setDefault! ( in Size paramKey, in Scalar value )


OGLProgram.setDefault! ( in Size paramKey, in Vec2 value )


OGLProgram.setDefault! ( in Size paramKey, in Vec3 value )


OGLProgram.setDefault! ( in Size paramKey, in Vec4 value )


~ OGLProgram ()