#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 |
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 |
Functions | |
SH_DLLEXPORT void | shCompileShader (ShProgram &prg, const std::string &target) |
SH_DLLEXPORT void | shBreak () |
SH_DLLEXPORT void | shContinue () |
Definition in file ShSyntax.hpp.
|
Begin a new program block. Nesting programs is not allowed.
Definition at line 53 of file ShSyntax.hpp. Referenced by SH::access(), SH::cast(), SH::connect(), SH::dup(), SH::fillcast(), SH::keep(), SH::lerp(), SH::lose(), SH::namedConnect(), SH::operator<<(), SH::renameInput(), SH::renameOutput(), and SH::transform(). |
|
Break out of a loop, terminating the loop.
Definition at line 185 of file ShSyntax.hpp. |
|
Break out of a loop, continuing with the next iteration.
Definition at line 193 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 215 of file ShSyntax.hpp. Referenced by SH::lerp(). |
|
Indicate the start of a do-until statement.
Definition at line 130 of file ShSyntax.hpp. |
|
Indicate the start of the else-block of an if statement.
Definition at line 86 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 62 of file ShSyntax.hpp. Referenced by SH::connect(), SH::dup(), SH::keep(), SH::lose(), and SH::operator<<(). |
|
Indicate the end of a for statement.
Definition at line 169 of file ShSyntax.hpp. |
|
Indicate the end of an if-statement.
Definition at line 95 of file ShSyntax.hpp. |
|
Indicate the end of a while-statement.
Definition at line 117 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 151 of file ShSyntax.hpp. |
|
Begin an if statement.
Definition at line 77 of file ShSyntax.hpp. |
|
Set the name of a variable to be its C++ name.
Definition at line 204 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 225 of file ShSyntax.hpp. Referenced by SH::access(), SH::cast(), SH::dup(), SH::fillcast(), SH::keep(), SH::lerp(), SH::lose(), and SH::transform(). |
|
End a do-until statement, iterating as long as cond is satisfied.
Definition at line 137 of file ShSyntax.hpp. |
|
Begin a while statement, iterating as long as cond is satisfied.
Definition at line 107 of file ShSyntax.hpp. |
|
|