Support Forum G3D Web Page |
G3D Innovation Engine http://casual-effects.com/g3d Copyright 2000-2019, Morgan McGuire All rights reserved Available under the BSD License. More...
Classes | |
class | G3D::Shader::ShaderProgram::AttributeDeclaration |
Vertex Attribute (stream) variable declaration discovered in the program. More... | |
class | G3D::Shader::PreprocessedShaderSource |
A structure containing the individual parts of the code of a load-time preprocessed (by g3d, not the driver) shader. More... | |
class | G3D::Shader |
Abstraction of the programmable hardware pipeline with G3D preprocessor extensions. More... | |
class | G3D::Shader::ShaderProgram |
A wrapper around an actual openGL shader program object. More... | |
class | G3D::Shader::Source |
Stores either a filename or a shader source string (that has not gone through the g3d preprocessor) for a single shader stage. More... | |
class | G3D::Shader::Specification |
Consists of up to one Shader::Source per shader stage. More... | |
class | G3D::Shader::ShaderProgram::UniformDeclaration |
Uniform variable declaration discovered in the program. More... | |
Namespaces | |
G3D | |
Macros | |
#define | G3D_gfx_Shader_h |
#define | LAUNCH_SHADER(pattern, args) |
Get a shader from the cache, loading it if necessary, and launch it on the current RenderDevice using args. More... | |
#define | LAUNCH_SHADER_PTR(shader, args) |
Launch an already-loaded shader. More... | |
#define | LAUNCH_SHADER_PTR_WITH_HINT(shader, args, hint) |
#define | LAUNCH_SHADER_WITH_HINT(pattern, args, hint) |
G3D Innovation Engine http://casual-effects.com/g3d Copyright 2000-2019, Morgan McGuire All rights reserved Available under the BSD License.
#define G3D_gfx_Shader_h |
#define LAUNCH_SHADER | ( | pattern, | |
args | |||
) |
Get a shader from the cache, loading it if necessary, and launch it on the current RenderDevice using args.
Avoids much of the boilerplate of declaring and initializing shader member variables.
The first argument is a pattern to match all source files for the shader. The pattern is first passed directly to G3D::System::findDataFile. If this fails, the pattern is searched for an underscore. If there is an underscore, everything up to the first underscore is used as a directory name. For example,
LAUNCH_SHADER("Film_foo.*", args)
first searches for files matching "Film_foo.*". If no files match, then the pattern "Film/Film_foo.*" is tried. The part of the pattern up to the first underscore is both the directory name and part of the filename.
It is an error if neither of the above two patterns matches any files. It is also an error if the first pattern doesn't match any files and the pattern begins with an underscore.
Note that the underlying G3D::Shader class and G3D::RenderDevice::apply call are available for usage scenarios that do not fit the common pattern.
#define LAUNCH_SHADER_PTR | ( | shader, | |
args | |||
) |
Launch an already-loaded shader.
#define LAUNCH_SHADER_PTR_WITH_HINT | ( | shader, | |
args, | |||
hint | |||
) |
#define LAUNCH_SHADER_WITH_HINT | ( | pattern, | |
args, | |||
hint | |||
) |