#include "ShDllExport.hpp"
#include "ShProgram.hpp"
#include "ShUtility.hpp"
Include dependency graph for ShSyntax.hpp:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Namespaces | |
| namespace | SH |
| #define | SH_PUSH_ARG_QUEUE |
| #define | SH_PUSH_ARG |
| #define | SH_PROCESS_ARG(arg, internal_cond) |
Shader definitions | |
| #define | SH_BEGIN_PROGRAM(target) |
| Begin a new program block. | |
| #define | SH_END_PROGRAM |
| End the current program definition. | |
If statements | |
| #define | SH_IF(cond) |
| Begin an if statement. | |
| #define | SH_ELSE |
| Indicate the start of the else-block of an if statement. | |
| #define | SH_ENDIF |
| Indicate the end of an if-statement. | |
While loops | |
| #define | SH_WHILE(cond) |
| Begin a while statement, iterating as long as cond is satisfied. | |
| #define | SH_ENDWHILE |
| Indicate the end of a while-statement. | |
Do-until loops | |
| #define | SH_DO |
| Indicate the start of a do-until statement. | |
| #define | SH_UNTIL(cond) |
| End a do-until statement, iterating as long as cond is satisfied. | |
For loops | |
| #define | SH_FOR(init, cond, update) |
| Begin a for statement. | |
| #define | SH_ENDFOR |
| Indicate the end of a for statement. | |
Loop flow control | |
| #define | SH_BREAK |
| Break out of a loop, terminating the loop. | |
| #define | SH_CONTINUE |
| Break out of a loop, continuing with the next iteration. | |
Named Declaration macros | |
| #define | SH_NAME(var) |
| Set the name of a variable to be its C++ name. | |
| #define | SH_DECL(var) |
| Declare variable with the same name as var. | |
| #define | SH_NAMEDECL(var, varName) |
| Declare variable with the given name Usage: Sh_Some_Type SH_NAMEDECL(var, "name"); or Sh_Some_Type SH_NAMEDECL(var, "name") = initial_value;. | |
Defines | |
| #define | SH_END |
| #define | SH_BEGIN_VERTEX_PROGRAM |
| #define | SH_BEGIN_FRAGMENT_PROGRAM |
| #define | SH_BEGIN_SECTION(name) |
| Starts a block grouping - for affine analysis and organization of code for visual languages. | |
| #define | SH_END_SECTION |
Functions | |
| bool | SH::shProcessArg (const ShVariable &arg, bool *internal_cond) |
| bool | SH::shPushArg () |
| bool | SH::shPushArgQueue () |
| bool | SH::shEvaluateCondition (const ShVariable &arg) |
| ShProgram | SH::shBeginShader (const std::string &target) |
| void | SH::shEndShader () |
| void | SH::shCompile (ShProgram &prg) |
| Force (re)compilation of a program under its default target. | |
| void | SH::shCompile (ShProgram &prg, const std::string &target) |
| Force (re)compilation of a program for a given target. | |
| void | SH::shCompileShader (ShProgram &prg) |
| SH_DLLEXPORT void | SH::shCompileShader (ShProgram &prg, const std::string &target) |
| void | SH::shBind (ShProgram &prg) |
| Bind a program using the program's default target. | |
| void | SH::shBind (const std::string &target, ShProgram &prg) |
| Bind a program with the given target. | |
| void | SH::shBindShader (ShProgram &shader) |
| void | SH::shBindShader (const std::string &target, ShProgram &shader) |
| void | SH::shBind (const ShProgramSet &s) |
| Bind a set of programs. | |
| void | SH::shUnbind () |
| Unbind all currently bound programs. | |
| void | SH::shUnbind (ShProgram &prg) |
| Unbind a program. | |
| void | SH::shUnbind (const std::string &target, ShProgram &prg) |
| Unbind a program with the given target. | |
| void | SH::shUnbind (const ShProgramSet &s) |
| Unbind a set of programs, if it's bound. | |
| void | SH::shLink (const ShProgramSet &s) |
| Link a set of programs. | |
| void | SH::shUpdate () |
| Upload any textures and uniform parameters which are out-of-date but required on all compilation targets that have any programs bound. | |
| bool | SH::shSetBackend (const std::string &name) |
| Switch to a particular backend. | |
| bool | SH::shUseBackend (const std::string &name) |
| Add a backend to the list of selected backends. | |
| bool | SH::shHaveBackend (const std::string &name) |
| Checks whether the backend is available. | |
| void | SH::shClearBackends () |
| Clear the list of selected backends. | |
| std::string | SH::shFindBackend (const std::string &target) |
| Find the name of the best backend that handles the given target. | |
| void | SH::shInit () |
| SH Initialization Function. | |
| void | SH::shIf (bool) |
| void | SH::shElse () |
| void | SH::shEndIf () |
| void | SH::shWhile (bool) |
| void | SH::shEndWhile () |
| void | SH::shDo () |
| void | SH::shUntil (bool) |
| void | SH::shFor (bool) |
| void | SH::shEndFor () |
| SH_DLLEXPORT void | SH::shBreak () |
| SH_DLLEXPORT void | SH::shContinue () |
| void | SH::shBeginSection () |
| void | SH::shEndSection () |
| void | SH::shComment (const std::string &comment) |
Definition in file ShSyntax.hpp.
|
|
|
Starts a block grouping - for affine analysis and organization of code for visual languages.
Definition at line 201 of file ShSyntax.hpp. |
|
|
Break out of a loop, terminating the loop.
Definition at line 182 of file ShSyntax.hpp. |
|
|
Break out of a loop, continuing with the next iteration.
Definition at line 190 of file ShSyntax.hpp. |
|
|
Declare variable with the same name as var. Usage: Sh_Some_Type SH_DECL(var); or Sh_Some_TYPE SH_DECL(var) = initial_value;
Definition at line 232 of file ShSyntax.hpp. Referenced by ShUtil::ShKernelSurfMap::bump(), ShUtil::ShKernelSurface::diffuse(), ShUtil::ShKernelSurface::gooch(), SH::max(), ShUtil::ShKernelSurface::null(), ShUtil::ShKernelSurface::phong(), ShUtil::ShKernelLight::pointLight(), ShUtil::shWorley(), ShUtil::ShKernelSurface::specular(), ShUtil::ShKernelLight::spotLight(), ShUtil::ShKernelLight::texLight2D(), and ShUtil::ShKernelSurfMap::vcsBump(). |
|
|
Indicate the start of a do-until statement.
Definition at line 127 of file ShSyntax.hpp. |
|
|
Indicate the start of the else-block of an if statement.
Definition at line 83 of file ShSyntax.hpp. |
|
|
End the current program definition. If there is a backend and the program has a specified target (e.g. vertex or fragment), this will also compile the program.
Definition at line 59 of file ShSyntax.hpp. Referenced by SH::connect(), SH::dup(), SH::keep(), SH::lose(), SH::operator<<(), and ShUtil::shWorley(). |
|
|
Indicate the end of a for statement.
Definition at line 166 of file ShSyntax.hpp. |
|
|
Indicate the end of an if-statement.
Definition at line 92 of file ShSyntax.hpp. |
|
|
Indicate the end of a while-statement.
Definition at line 114 of file ShSyntax.hpp. |
|
|
Begin a for statement. The semantics are mostly the same as for C++ for statements, but unlike in C++ declaring variables in init part is not allowed.
Definition at line 148 of file ShSyntax.hpp. |
|
|
Begin an if statement.
Definition at line 74 of file ShSyntax.hpp. |
|
|
Set the name of a variable to be its C++ name.
Definition at line 221 of file ShSyntax.hpp. |
|
|
Declare variable with the given name Usage: Sh_Some_Type SH_NAMEDECL(var, "name"); or Sh_Some_Type SH_NAMEDECL(var, "name") = initial_value;.
Definition at line 242 of file ShSyntax.hpp. Referenced by SH::access(), SH::cast(), SH::dup(), SH::fillcast(), SH::keep(), SH::lose(), SH::max(), ShUtil::ShKernelLib::shChangeBasis(), ShUtil::ShKernelLib::shVsh(), and SH::transform(). |
|
|
End a do-until statement, iterating as long as cond is satisfied.
Definition at line 134 of file ShSyntax.hpp. |
|
|
Begin a while statement, iterating as long as cond is satisfied.
Definition at line 104 of file ShSyntax.hpp. |
1.4.3-20050530