OGLProgram.kl

Types

OGLProgram_param (struct)

Members

String name  
UInt32 index  
UInt32 location  
UInt32 paramCategory  
Size size  
UInt32 componentPerItem  
UInt32 samplerTextureUnit  
UInt32 expectedTextureType  
Integer glType  
Integer glComponentType  
Boolean isMatrix  
Boolean isShadowTexture  
Boolean isUserParameter  
Type klType  
Size cacheStorageOffsetOrInlineValue  
Size defaultValueCacheStorageOffsetOrInlineValue  
Boolean currentlyDefault  
Size wordCountPerItem  
Size totalWordCount  

OGLProgram_outFragment (struct)

Members

String name  
Integer location  

OGLProgram (object)

A OGLProgram wraps a GLSL program object.

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

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 ()

Functions

OGLProgram_paramCategoryToString

String OGLProgram_paramCategoryToString ( in UInt32 paramCategory )

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

OGLProgram_glTypeToString

String OGLProgram_glTypeToString ( in Integer glType )

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

OGLProgram_glTypeInfo

OGLProgram_glTypeInfo ( in Integer glType, io Integer glComponentType, io UInt32 componentPerItem, io Type klType, io Size bytes, io Boolean isSampler, io UInt32 expectedTextureType, io Boolean shadowTexture, io Boolean isMatrix )

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

_RemoveGLParamNameArraySuffix

_RemoveGLParamNameArraySuffix ( io String name )

SearchGLSLShader

Boolean SearchGLSLShader ( in String directory, in String namePrefix, in String includePath )

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