<Program> Data Interface

Provides script language access to C++ objects of this type.

Class HierarchyType » Node » Group » Program

Function Members

Function members are as follows:

Return Type Function Name Documentation
int32BindAttribBinds a channel to a vertex attribute index.
int32ClearAttribBindingsClears the current attribute binding indices used by the <Program>.
int32DeleteDeletes the program through its association with a <RenderInfo> object that binds it to the rendering device.
int32GetActiveShadersPopulates a <StrList> with the path and filename of shaders used by this <Program>. Does not return any value for shaders not being used. For example: if this <Program> does not use a geometry shader, then no value will be added to the <StrList> submitted to this function.
stringGetComputeFileGets the <Program> node object's compute shader source file path.
stringGetControlFileGets the <Program> node object's tessellation control shader source file path.Undocumented.
int32GetCountReturns the count of shader source files for this <Program>. For example, this function returns 3 if this <Program> specifies a path for the vertex, geometry, and fragment shaders.
stringGetEvaluationFileGets the <Program> node object's tessellation evaluation shader source file path.Undocumented.
stringGetFragmentFileGets the <Program> node object's fragment shader source file path.
stringGetGeometryFileGets the <Program> node object's geometry shader source file path.
uint64GetHandleGets a handle for the <Program> node. This handle is a rendering device handle, generated when the <Program> is successfully compiled by the rendering device.
stringGetMeshFileGets the <Program> node object's mesh shader source file path.
stringGetProfileStringReturns the profile string such as "es" or "compatibility" or "core".
int32GetSPAAttributeCountDeprecated
int32GetSPAColorAttributeCountReturns the count of vertex color attributes used by the shader.
int32GetSPADataAttributeCountReturns the count of vertex data attributes used by the shader.
int32GetSPANormalAttributeCountReturns the count of vertex normal attributes used by the shader.
int32GetSPAPositionAttributeCountReturns the count of vertex position attributes used by the shader.
int32GetSPASamplerCountReturns the count of texture samplers used by the shader.
int32GetSPATexCoordAttributeCountReturns the count of vertex texture coordinate attributes used by the shader.
stringGetShaderAtReturns a string containing the path to the shader source code for the vertex, control, tessellation, geometry, or fragment shader.
int32GetShaderIndicesPopulates an <Int32Array> with enumerated constants for each active shader stage. This refers to the ShaderStage enumeration. Please see TYPE_SERVICE_ENUMERATION_UTIL.SSL in the application scripts folder for more information.
int32GetShadersPopulates a <StrList> with the path and filename of each active shader stage.
int32GetShadersAbsPopulates a <StrList> with the absolute paths for all this <Program> object's shader source files.
stringGetTaskFileGets the <Program> node object's task shader source file path.
int32GetUniformsPopulates a <NodeBuffer> with any child <VariableNode> objects declared as uniforms.
stringGetVersionStringReturns the version string such as "#version 430 core" or "#version 300 es".
stringGetVertexFileGets the <Program> node object's vertex shader source file path.
int32IsCompiledReturns true if the <Program> object is compiled. Returns false if <Program> compilation fails for any reason ( including if the <Program> isn't being used, such as when it's off-screen. )
static int32LoadTranslationUnitLoads a complete translation unit for the source code of a particular shader. This is the entire shader, with all includes, line numbers, and all preprocessor tokens as well.
static int32LoadTranslationUnitLinesLoads a complete translation unit for the source code of the specified shader into a <StrList>. This is the entire shader, with all includes, line numbers, and all preprocessor tokens as well.
int32SelectActivates a <Program> in a rendering device.
int32SetComputeFileSets the <Program> node object's compute shader source file path.
int32SetControlFileSets the <Program> node object's tessellation control shader source file path.
int32SetEvaluationFileSets the <Program> node object's tessellation evaluation shader source file path.
int32SetFragmentFileSets the <Program> node object's fragment shader source file path.
int32SetGeometryFileSets the <Program> node object's geometry shader source file path.
int32SetMeshFileSets the <Program> node object's mesh shader source file path.
int32SetShaderAtSets the path to the shader source for the indicated shader stage.
int32SetTaskFileSets the <Program> node object's task shader source file path.
int32SetVertexFileSets the <Program> node object's vertex shader source file path.

Object Members

Object members are as follows:

Type Name Accessor Name Documentation
int32InjectVersionIf true, this injects the version declaration as the first line in the compiled shader code. This means that you don't have to declare the version in your shader. This option is enabled by default, and can be disabled at any time.
int32InputTopologyObsolete. Prefer setting this value in the shader code.
int32MaxOutputVerticesObsolete. Prefer setting this value in the shader code.
<Node>MeshGets or sets the <Program> node object's Mesh connection. This is a <Mesh> node associated with the <Program>.
<Node>MeshLinkGets or sets the <Program> node object's Mesh connection. This is a <Mesh> node associated with the <Program>. This allows accessing or assigning a <NodeLink>.
int32OutputTopologyObsolete. Prefer setting this value in the shader code.
int32PipelineModeSets or gets the PipelineMode value. There are three pipeline modes: graphics shaders (such as vertex, control, evaluation, geometry or fragment), compute shaders, or mesh shader (such as task, mesh, fragment). This refers to the ShaderPipelineMode enumeration. Please see TYPE_SERVICE_ENUMERATION_UTIL.SSL in the application scripts folder for more information.
<Node>PreRenderHookGets or sets the <Program> node object's PreRenderHook. The node connected to the <Program> via this <NodeSink> is rendered before the program is compiled, allowing you to do a variety of things, including generating or modifying the GLSL source code immediately before compilation.
<Node>PreRenderHookLinkGets or sets the <Program> node object's PreRenderHookLink. This allows accessing or assigning a <NodeLink>.
int32PrintCompileStatusThis option is undocumented at present.
<Node>RenderHookThis member accesses a <Program> node object's RenderHook parameter. The render hook executes after the <Material> node activates its state, and supports initializing additional render state such as shader constants.
<Node>RenderHookLinkThis member accesses a <Program> node object's RenderHookLink parameter. This allows accessing or assigning a <NodeLink> for the render hook.
<Node>SamplerPaletteThis member sets or gets the program node's PreRenderHook.
<Node>SamplerPaletteLinkThis member sets or gets the program node's PreRenderHookLink.
<Node>SamplersGets or sets the <Program> node object's Samplers connection. This is a <SamplerPaletteNode> node associated with the <Program>.
<Node>SamplersLinkGets or sets the <Program> node object's Samplers connection. This is a <SamplerPaletteNode> node associated with the <Program>. This allows accessing or assigning a <NodeLink>.
int32ShadingLanguageIndexReturns the index of the shading language. For example: returns 0, 1, or 2, which would mean 100, 110, or 120. This refers to the ShadingLanguageIndex enumeration. Please see TYPE_SERVICE_ENUMERATION_UTIL.SSL in the application scripts folder for more information.
int32ShadingLanguageProfileReturns the index of the shading language profile. For example: returns 0, 1, or 2, which would mean core, compatibility, or es. This refers to the ShadingLanguageProfile enumeration. Please see TYPE_SERVICE_ENUMERATION_UTIL.SSL in the application scripts folder for more information.
int32ShadingLanguageVersionGets or sets the shading language version for this object. For example 300, 330, 400, 410, 450, or 460. This refers to the ShadingLanguageVersion enumeration. Please see TYPE_SERVICE_ENUMERATION_UTIL.SSL in the application scripts folder for more information.
<Node>UniformPaletteThis member accesses a program node's RENDERHOOK parameter. The render hook executes after the material activates its state, and supports initializing additional render state such as shader constants.
<Node>UniformPaletteLinkThis member accesses a program node's RENDERHOOKLINK parameter. This allows accessing or assigning a NodeLink for the render hook.