LoadTranslationUnit Data Member Function

Loads 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.

Prototype

static int32 LoadTranslationUnit( Node p_oNodeInModel, string p_sPath, int32 p_eVersion, int32 p_eProfile, string p_sVendor, Str p_oData )

Parameters

Parameter Type Parameter Name Documentation
<Node>p_oNodeInModelA <Node> in the model that is used for file path resolution. Usually the <Program> node that contains the shader source code or the document root.
stringp_sPathThe absolute path to the shader source code.
int32p_eVersionThe GLSL compiler version. Refers to the ShadingLanguageVersion enumeration. Please see TYPE_SERVICE_ENUMERATION_UTIL.SSL in the application scripts folder for more information.
int32p_eProfileThe GLSL profile. Refers to the ShadingLanguageProfile enumeration. Please see TYPE_SERVICE_ENUMERATION_UTIL.SSL in the application scripts folder for more information.
stringp_sVendorThe vendor string such as SPA_GL_UNKNOWN, SPA_GL_NVIDIA, SPA_GL_AMD, SPA_GL_INTEL, or SPA_GL_BROADCOM 4.
<Str>p_oDataA pointer to a <Str> object that stores the translation unit source code.

Examples

Copy Text To Clipboard

None published. Please look for an example in the Scenome Scripting Language code base.