Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ShSyntax.hpp File Reference

Sh syntactical definitions. More...

#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 ()


Detailed Description

Sh syntactical definitions.

Definition in file ShSyntax.hpp.


Define Documentation

#define SH_BEGIN_PROGRAM target   ) 
 

Begin a new program block.

Nesting programs is not allowed.

Return values:
ShProgram A reference to the new program.
See also:
SH_END_PROGRAM

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().

#define SH_BREAK
 

Break out of a loop, terminating the loop.

See also:
SH_CONTINUE

SH_WHILE

SH_DO

SH_FOR

Definition at line 185 of file ShSyntax.hpp.

#define SH_CONTINUE
 

Break out of a loop, continuing with the next iteration.

See also:
SH_BREAK

SH_WHILE

SH_DO

SH_FOR

Definition at line 193 of file ShSyntax.hpp.

#define SH_DECL var   ) 
 

Declare variable with the same name as var.

Usage: Sh_Some_Type SH_DECL(var); or Sh_Some_TYPE SH_DECL(var) = initial_value;

See also:
SH_NAMEDDECL

Definition at line 215 of file ShSyntax.hpp.

Referenced by SH::lerp().

#define SH_DO
 

Indicate the start of a do-until statement.

See also:
SH_UNTIL

Definition at line 130 of file ShSyntax.hpp.

#define SH_ELSE
 

Indicate the start of the else-block of an if statement.

See also:
SH_IF

SH_ENDIF

Definition at line 86 of file ShSyntax.hpp.

#define SH_END_PROGRAM
 

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.

See also:
SH_BEGIN_PROGRAM

Definition at line 62 of file ShSyntax.hpp.

Referenced by SH::connect(), SH::dup(), SH::keep(), SH::lose(), and SH::operator<<().

#define SH_ENDFOR
 

Indicate the end of a for statement.

See also:
SH_FOR

Definition at line 169 of file ShSyntax.hpp.

#define SH_ENDIF
 

Indicate the end of an if-statement.

See also:
SH_IF

SH_ELSE

Definition at line 95 of file ShSyntax.hpp.

#define SH_ENDWHILE
 

Indicate the end of a while-statement.

See also:
SH_WHILE

Definition at line 117 of file ShSyntax.hpp.

#define SH_FOR init,
cond,
update   ) 
 

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.

See also:
SH_ENDFOR

Definition at line 151 of file ShSyntax.hpp.

#define SH_IF cond   ) 
 

Begin an if statement.

See also:
SH_ELSE

SH_ENDIF

Definition at line 77 of file ShSyntax.hpp.

#define SH_NAME var   ) 
 

Set the name of a variable to be its C++ name.

See also:
SH_DECL

SH_NAMEDECL

Definition at line 204 of file ShSyntax.hpp.

#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;.

See also:
SH_DECL

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().

#define SH_UNTIL cond   ) 
 

End a do-until statement, iterating as long as cond is satisfied.

See also:
SH_DO

Definition at line 137 of file ShSyntax.hpp.

#define SH_WHILE cond   ) 
 

Begin a while statement, iterating as long as cond is satisfied.

See also:
SH_ENDWHILE

Definition at line 107 of file ShSyntax.hpp.


Function Documentation

SH_DLLEXPORT void shCompileShader ShProgram &  prg,
const std::string &  target
 

Deprecated:
Use shCompile() instead


Generated on Mon Jan 24 18:37:40 2005 for Sh by  doxygen 1.4.1