GLSL ES target language writer implementation. More...
#include <OgreShaderGLSLESProgramWriter.h>
Public Member Functions | |
GLSLESProgramWriter () | |
Class constructor. | |
virtual | ~GLSLESProgramWriter () |
Class destructor. | |
virtual void | writeSourceCode (std::ostream &os, Program *program) |
virtual const String & | getTargetLanguage () const |
void * | operator new (size_t sz, const char *file, int line, const char *func) |
operator new, with debug line info | |
void * | operator new (size_t sz) |
void * | operator new (size_t sz, void *ptr) |
placement operator new | |
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
array operator new, with debug line info | |
void * | operator new[] (size_t sz) |
void | operator delete (void *ptr) |
void | operator delete (void *ptr, void *) |
void | operator delete (void *ptr, const char *, int, const char *) |
void | operator delete[] (void *ptr) |
void | operator delete[] (void *ptr, const char *, int, const char *) |
Static Public Attributes | |
static String | TargetLanguage |
Protected Types | |
typedef std::map < GpuConstantType, const char * > | GpuConstTypeToStringMap |
typedef std::map < Parameter::Semantic, const char * > | ParamSemanticToStringMap |
typedef std::map < Parameter::Content, const char * > | ParamContentToStringMap |
typedef std::map< String, String > | StringMap |
typedef std::map < FunctionInvocation, String > | FunctionMap |
typedef std::vector < FunctionInvocation > | FunctionVector |
typedef FunctionMap::const_iterator | FunctionMapIterator |
typedef FunctionVector::const_iterator | FunctionVectorIterator |
typedef GpuConstTypeToStringMap::const_iterator | GpuConstTypeToStringMapIterator |
Protected Member Functions | |
void | initializeStringMaps () |
Initialize string maps. | |
virtual void | cacheDependencyFunctions (const String &libName) |
Cache functions of a dependency. | |
FunctionInvocation * | createInvocationFromString (const String &input) |
Create a FunctionInvocation object from a string taken out of a shader library. | |
void | writeProgramDependencies (std::ostream &os, Program *program) |
Write the program dependencies. | |
void | writeLocalParameter (std::ostream &os, ParameterPtr parameter) |
Write a local parameter. | |
void | writeInputParameters (std::ostream &os, Function *function, GpuProgramType gpuType) |
Write the input params of the function. | |
void | writeOutParameters (std::ostream &os, Function *function, GpuProgramType gpuType) |
Write the output params of the function. | |
void | writeAssignFunction (std::stringstream &os, FunctionInvocation::OperandVector::iterator itOperand, FunctionInvocation::OperandVector::iterator itOperandEnd, GpuProgramType gpuType) |
String | processOperand (Operand op, GpuProgramType gpuType) |
bool | isBasicType (String &type) |
Check if a string matches one of the GLSL ES basic types. | |
void | discoverFunctionDependencies (const FunctionInvocation &invoc, FunctionVector &depVector) |
Search within a function body for non-builtin functions that a given function invocation depends on. | |
void | writeProgramTitle (std::ostream &os, Program *program) |
Write the program title. | |
void | writeUniformParametersTitle (std::ostream &os, Program *program) |
Write the uniform parameters title. | |
void | writeFunctionTitle (std::ostream &os, Function *function) |
Write a function title. | |
Protected Attributes | |
GpuConstTypeToStringMap | mGpuConstTypeMap |
ParamSemanticToStringMap | mParamSemanticMap |
StringMap | mInputToGLStatesMap |
FunctionMap | mFunctionCacheMap |
StringMap | mDefinesMap |
ParamContentToStringMap | mContentToPerVertexAttributes |
int | mGLSLVersion |
StringVector | mFragInputParams |
StringMap | mCachedFunctionLibraries |
GLSL ES target language writer implementation.
Definition at line 45 of file OgreShaderGLSLESProgramWriter.h.
typedef std::map<FunctionInvocation, String> Ogre::RTShader::GLSLESProgramWriter::FunctionMap [protected] |
Definition at line 80 of file OgreShaderGLSLESProgramWriter.h.
typedef FunctionMap::const_iterator Ogre::RTShader::GLSLESProgramWriter::FunctionMapIterator [protected] |
Definition at line 82 of file OgreShaderGLSLESProgramWriter.h.
typedef std::vector<FunctionInvocation> Ogre::RTShader::GLSLESProgramWriter::FunctionVector [protected] |
Definition at line 81 of file OgreShaderGLSLESProgramWriter.h.
typedef FunctionVector::const_iterator Ogre::RTShader::GLSLESProgramWriter::FunctionVectorIterator [protected] |
Definition at line 83 of file OgreShaderGLSLESProgramWriter.h.
typedef std::map<GpuConstantType, const char*> Ogre::RTShader::GLSLESProgramWriter::GpuConstTypeToStringMap [protected] |
Definition at line 76 of file OgreShaderGLSLESProgramWriter.h.
typedef GpuConstTypeToStringMap::const_iterator Ogre::RTShader::GLSLESProgramWriter::GpuConstTypeToStringMapIterator [protected] |
Definition at line 84 of file OgreShaderGLSLESProgramWriter.h.
typedef std::map<Parameter::Content, const char*> Ogre::RTShader::GLSLESProgramWriter::ParamContentToStringMap [protected] |
Definition at line 78 of file OgreShaderGLSLESProgramWriter.h.
typedef std::map<Parameter::Semantic, const char*> Ogre::RTShader::GLSLESProgramWriter::ParamSemanticToStringMap [protected] |
Definition at line 77 of file OgreShaderGLSLESProgramWriter.h.
typedef std::map<String, String> Ogre::RTShader::GLSLESProgramWriter::StringMap [protected] |
Definition at line 79 of file OgreShaderGLSLESProgramWriter.h.
Ogre::RTShader::GLSLESProgramWriter::GLSLESProgramWriter | ( | ) |
Class constructor.
language | The target shader language. |
virtual Ogre::RTShader::GLSLESProgramWriter::~GLSLESProgramWriter | ( | ) | [virtual] |
Class destructor.
virtual void Ogre::RTShader::GLSLESProgramWriter::cacheDependencyFunctions | ( | const String & | libName | ) | [protected, virtual] |
Cache functions of a dependency.
FunctionInvocation* Ogre::RTShader::GLSLESProgramWriter::createInvocationFromString | ( | const String & | input | ) | [protected] |
Create a FunctionInvocation object from a string taken out of a shader library.
void Ogre::RTShader::GLSLESProgramWriter::discoverFunctionDependencies | ( | const FunctionInvocation & | invoc, | |
FunctionVector & | depVector | |||
) | [protected] |
Search within a function body for non-builtin functions that a given function invocation depends on.
virtual const String& Ogre::RTShader::GLSLESProgramWriter::getTargetLanguage | ( | void | ) | const [virtual] |
Implements Ogre::RTShader::ProgramWriter.
Definition at line 71 of file OgreShaderGLSLESProgramWriter.h.
References TargetLanguage.
void Ogre::RTShader::GLSLESProgramWriter::initializeStringMaps | ( | ) | [protected] |
Initialize string maps.
bool Ogre::RTShader::GLSLESProgramWriter::isBasicType | ( | String & | type | ) | [protected] |
Check if a string matches one of the GLSL ES basic types.
void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr, | |
const char * | , | |||
int | , | |||
const char * | ||||
) | [inherited] |
Definition at line 107 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr, | |
void * | ||||
) | [inherited] |
Definition at line 101 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr | ) | [inherited] |
Definition at line 95 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr, | |
const char * | , | |||
int | , | |||
const char * | ||||
) | [inherited] |
Definition at line 118 of file OgreMemoryAllocatedObject.h.
void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr | ) | [inherited] |
Definition at line 112 of file OgreMemoryAllocatedObject.h.
void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz, | |
void * | ptr | |||
) | [inherited] |
placement operator new
Definition at line 78 of file OgreMemoryAllocatedObject.h.
void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz | ) | [inherited] |
Definition at line 72 of file OgreMemoryAllocatedObject.h.
void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz, | |
const char * | file, | |||
int | line, | |||
const char * | func | |||
) | [inherited] |
operator new, with debug line info
Definition at line 67 of file OgreMemoryAllocatedObject.h.
void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz | ) | [inherited] |
Definition at line 90 of file OgreMemoryAllocatedObject.h.
void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz, | |
const char * | file, | |||
int | line, | |||
const char * | func | |||
) | [inherited] |
array operator new, with debug line info
Definition at line 85 of file OgreMemoryAllocatedObject.h.
String Ogre::RTShader::GLSLESProgramWriter::processOperand | ( | Operand | op, | |
GpuProgramType | gpuType | |||
) | [protected] |
void Ogre::RTShader::GLSLESProgramWriter::writeAssignFunction | ( | std::stringstream & | os, | |
FunctionInvocation::OperandVector::iterator | itOperand, | |||
FunctionInvocation::OperandVector::iterator | itOperandEnd, | |||
GpuProgramType | gpuType | |||
) | [protected] |
void Ogre::RTShader::ProgramWriter::writeFunctionTitle | ( | std::ostream & | os, | |
Function * | function | |||
) | [protected, inherited] |
Write a function title.
void Ogre::RTShader::GLSLESProgramWriter::writeInputParameters | ( | std::ostream & | os, | |
Function * | function, | |||
GpuProgramType | gpuType | |||
) | [protected] |
Write the input params of the function.
void Ogre::RTShader::GLSLESProgramWriter::writeLocalParameter | ( | std::ostream & | os, | |
ParameterPtr | parameter | |||
) | [protected] |
Write a local parameter.
void Ogre::RTShader::GLSLESProgramWriter::writeOutParameters | ( | std::ostream & | os, | |
Function * | function, | |||
GpuProgramType | gpuType | |||
) | [protected] |
Write the output params of the function.
void Ogre::RTShader::GLSLESProgramWriter::writeProgramDependencies | ( | std::ostream & | os, | |
Program * | program | |||
) | [protected] |
Write the program dependencies.
void Ogre::RTShader::ProgramWriter::writeProgramTitle | ( | std::ostream & | os, | |
Program * | program | |||
) | [protected, inherited] |
Write the program title.
virtual void Ogre::RTShader::GLSLESProgramWriter::writeSourceCode | ( | std::ostream & | os, | |
Program * | program | |||
) | [virtual] |
Implements Ogre::RTShader::ProgramWriter.
void Ogre::RTShader::ProgramWriter::writeUniformParametersTitle | ( | std::ostream & | os, | |
Program * | program | |||
) | [protected, inherited] |
Write the uniform parameters title.
Definition at line 152 of file OgreShaderGLSLESProgramWriter.h.
ParamContentToStringMap Ogre::RTShader::GLSLESProgramWriter::mContentToPerVertexAttributes [protected] |
Definition at line 149 of file OgreShaderGLSLESProgramWriter.h.
Definition at line 148 of file OgreShaderGLSLESProgramWriter.h.
Definition at line 151 of file OgreShaderGLSLESProgramWriter.h.
Definition at line 147 of file OgreShaderGLSLESProgramWriter.h.
int Ogre::RTShader::GLSLESProgramWriter::mGLSLVersion [protected] |
Definition at line 150 of file OgreShaderGLSLESProgramWriter.h.
Definition at line 143 of file OgreShaderGLSLESProgramWriter.h.
Definition at line 146 of file OgreShaderGLSLESProgramWriter.h.
Definition at line 144 of file OgreShaderGLSLESProgramWriter.h.
Definition at line 73 of file OgreShaderGLSLESProgramWriter.h.
Referenced by getTargetLanguage().
Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Fri May 25 23:42:43 2012