OpenWalnut  1.2.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions
WGEShaderVersionPreprocessor Class Reference

This preprocessor removes the version-statement from the code and puts it to the beginning of the code. More...

#include <WGEShaderVersionPreprocessor.h>

+ Inheritance diagram for WGEShaderVersionPreprocessor:

List of all members.

Public Member Functions

 WGEShaderVersionPreprocessor ()
 Default constructor.
virtual ~WGEShaderVersionPreprocessor ()
 Destructor.
virtual std::string process (const std::string &file, const std::string &code) const
 Process the whole code.
- Public Member Functions inherited from WGEShaderPreprocessor
 WGEShaderPreprocessor ()
 Default constructor.
virtual ~WGEShaderPreprocessor ()
 Destructor.
virtual WCondition::SPtr getChangeCondition () const
 Returns the condition denoting a change in this preprocessor filter.
void setActive (bool active=true)
 (De-)activates the preprocessor.
bool getActive () const
 If the preprocessor is active, this returns true.

Additional Inherited Members

- Public Types inherited from WGEShaderPreprocessor
typedef boost::shared_ptr
< WGEShaderPreprocessor
SPtr
 Shared pointer for this class.
typedef boost::shared_ptr
< const WGEShaderPreprocessor
ConstSPtr
 A const shared pointer for this class.
- Protected Member Functions inherited from WGEShaderPreprocessor
virtual void updated ()
 Fires m_updateCondition which should denote an update in the preprocessor filter.

Detailed Description

This preprocessor removes the version-statement from the code and puts it to the beginning of the code.

This is requires for some GLSL compiler.

Definition at line 38 of file WGEShaderVersionPreprocessor.h.


Constructor & Destructor Documentation

WGEShaderVersionPreprocessor::WGEShaderVersionPreprocessor ( )

Default constructor.

Definition at line 35 of file WGEShaderVersionPreprocessor.cpp.

WGEShaderVersionPreprocessor::~WGEShaderVersionPreprocessor ( )
virtual

Destructor.

Definition at line 40 of file WGEShaderVersionPreprocessor.cpp.


Member Function Documentation

std::string WGEShaderVersionPreprocessor::process ( const std::string &  file,
const std::string &  code 
) const
virtual

Process the whole code.

It is not allowed to modify some internal state in this function because it might be called by several shaders.

Parameters:
codethe code to process
filethe filename of the shader currently processed. Should be used for debugging output.
Returns:
the resulting new code

Implements WGEShaderPreprocessor.

Definition at line 45 of file WGEShaderVersionPreprocessor.cpp.

References WGEShaderPreprocessor::getActive(), and wlog::warn().


The documentation for this class was generated from the following files: