HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ShaderStage.h File Reference
+ Include dependency graph for ShaderStage.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  VariableBlock
 
class  ShaderStage
 
struct  ShaderStage::Scope
 

Namespaces

 Stage
 

Macros

#define DEFINE_SHADER_STAGE(stage, name)   if (stage.getName() == name)
 
#define BEGIN_SHADER_STAGE(stage, name)
 
#define END_SHADER_STAGE(stage, name)   }
 

Typedefs

using VariableBlockPtr = std::shared_ptr< VariableBlock >
 Shared pointer to a VariableBlock. More...
 
using VariableBlockMap = std::unordered_map< string, VariableBlockPtr >
 Shared pointer to a map between string identifiers and VariableBlocks. More...
 
using ShaderPortPredicate = std::function< bool(ShaderPort *)>
 A standard function predicate taking an ShaderPort pointer and returning a boolean. More...
 
using ShaderStagePtr = std::shared_ptr< ShaderStage >
 Shared pointer to a ShaderStage. More...
 

Functions

ShaderPortaddStageUniform (const string &block, const TypeDesc *type, const string &name, ShaderStage &stage)
 Utility function for adding a new shader port to a uniform block. More...
 
ShaderPortaddStageInput (const string &block, const TypeDesc *type, const string &name, ShaderStage &stage, bool shouldWiden=false)
 Utility function for adding a new shader port to an input block. More...
 
ShaderPortaddStageOutput (const string &block, const TypeDesc *type, const string &name, ShaderStage &stage, bool shouldWiden=false)
 Utility function for adding a new shader port to an output block. More...
 
void addStageConnectorBlock (const string &block, const string &instance, ShaderStage &from, ShaderStage &to)
 Utility function for adding a connector block between stages. More...
 
void addStageConnector (const string &block, const TypeDesc *type, const string &name, ShaderStage &from, ShaderStage &to, bool shouldWiden=false)
 Utility function for adding a variable to a stage connector block. More...
 

Variables

MX_GENSHADER_API const string Stage::PIXEL
 

Detailed Description

Class related to holding information for shader stages

Definition in file ShaderStage.h.

Macro Definition Documentation

#define BEGIN_SHADER_STAGE (   stage,
  name 
)
Value:
if (stage.getName() == name) \
{
GLuint const GLchar * name
Definition: glcorearb.h:786

Definition at line 30 of file ShaderStage.h.

#define DEFINE_SHADER_STAGE (   stage,
  name 
)    if (stage.getName() == name)

Definition at line 27 of file ShaderStage.h.

#define END_SHADER_STAGE (   stage,
  name 
)    }

Definition at line 33 of file ShaderStage.h.

Typedef Documentation

using ShaderPortPredicate = std::function<bool(ShaderPort*)>

A standard function predicate taking an ShaderPort pointer and returning a boolean.

Definition at line 56 of file ShaderStage.h.

using ShaderStagePtr = std::shared_ptr<ShaderStage>

Shared pointer to a ShaderStage.

Definition at line 333 of file ShaderStage.h.

using VariableBlockMap = std::unordered_map<string, VariableBlockPtr>

Shared pointer to a map between string identifiers and VariableBlocks.

Definition at line 54 of file ShaderStage.h.

using VariableBlockPtr = std::shared_ptr<VariableBlock>

Shared pointer to a VariableBlock.

Definition at line 52 of file ShaderStage.h.

Function Documentation

void addStageConnector ( const string block,
const TypeDesc type,
const string name,
ShaderStage from,
ShaderStage to,
bool  shouldWiden = false 
)
inline

Utility function for adding a variable to a stage connector block.

Definition at line 378 of file ShaderStage.h.

void addStageConnectorBlock ( const string block,
const string instance,
ShaderStage from,
ShaderStage to 
)
inline

Utility function for adding a connector block between stages.

Definition at line 368 of file ShaderStage.h.

ShaderPort* addStageInput ( const string block,
const TypeDesc type,
const string name,
ShaderStage stage,
bool  shouldWiden = false 
)
inline

Utility function for adding a new shader port to an input block.

Definition at line 346 of file ShaderStage.h.

ShaderPort* addStageOutput ( const string block,
const TypeDesc type,
const string name,
ShaderStage stage,
bool  shouldWiden = false 
)
inline

Utility function for adding a new shader port to an output block.

Definition at line 357 of file ShaderStage.h.

ShaderPort* addStageUniform ( const string block,
const TypeDesc type,
const string name,
ShaderStage stage 
)
inline

Utility function for adding a new shader port to a uniform block.

Definition at line 336 of file ShaderStage.h.