Files Class List

Detailed Description

GLSL Shader Source class.

This class is derived from std::string. It includes a function for loading source files.

#include <cyGL.h>

+ Inheritance diagram for GLSLShader::Source:

Public Member Functions

bool LoadFile (char const *filename, std::ostream *outStream=&std::cout)
 Loads the given source file.
 
 operator char const * () const
 Returns the contents as a const char pointer.
 

Static Public Member Functions

static bool ParseIncludesFile (std::vector< std::string > &sources, char const *filename, std::string const &includePath, std::ostream *outStream=&std::cout)
 Loads the given source file and parses it for include statements. The contents of all included files are recursively added to the list. This method does not avoid possible infinite loops with nested include statements.
 
static bool ParseIncludes (std::vector< std::string > &sources, char const *sourceString, std::string const &includePath, std::ostream *outStream=&std::cout)
 Parses the given for include statements. Together with parts of the given string, the contents of all included files are recursively added to the returned vector. This method does not avoid possible infinite loops with nested include statements.