Support Forum       G3D Web Page     
Public Attributes | List of all members
G3D::Shader::PreprocessedShaderSource Class Reference

A structure containing the individual parts of the code of a load-time preprocessed (by g3d, not the driver) shader. More...

Public Attributes

String extensionsString
 Multiple lines containing "\#extension ..." definitions. More...
 
String filename
 The filename of the file where the code was originally loaded from. More...
 
String g3dInsertString
 The #defines and uniform args added by G3D. More...
 
String preprocessedCode
 The original code, with #includes evaluated, and the version line (if existant) replaced with an empty line. More...
 
String versionString
 A line of the form "\#version XXX" where XXX is a three digit number denoting the GLSL version for the graphics driver to use. More...
 

Detailed Description

A structure containing the individual parts of the code of a load-time preprocessed (by g3d, not the driver) shader.

This is combined with the macro argument and preamble string at compilation time in the following manner: versionString + g3dInsertString + expandForPragmas(preprocessedCode).

Member Data Documentation

◆ extensionsString

String G3D::Shader::PreprocessedShaderSource::extensionsString

Multiple lines containing "\#extension ..." definitions.

Inserted at the beginning of the final code submitted to the driver, right after the version line.

◆ filename

String G3D::Shader::PreprocessedShaderSource::filename

The filename of the file where the code was originally loaded from.

Note that this does not somehow account for #include pragmas.

◆ g3dInsertString

String G3D::Shader::PreprocessedShaderSource::g3dInsertString

The #defines and uniform args added by G3D.

Does not include user-defined macro arguments or preamble

◆ preprocessedCode

String G3D::Shader::PreprocessedShaderSource::preprocessedCode

The original code, with #includes evaluated, and the version line (if existant) replaced with an empty line.

This is before the actual driver preprocessing and #for pragma expansion, so #defines, #ifs, and #fors have not yet been evaluated

◆ versionString

String G3D::Shader::PreprocessedShaderSource::versionString

A line of the form "\#version XXX" where XXX is a three digit number denoting the GLSL version for the graphics driver to use.

Inserted at the beginning of the final code submitted to the driver.


documentation generated on Wed Nov 24 2021 08:02:00 using doxygen 1.8.15