OGRE  2.0
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Ogre::RTShader::GLSLESProgramWriter Class Reference

GLSL ES target language writer implementation. More...

#include <OgreShaderGLSLESProgramWriter.h>

+ Inheritance diagram for Ogre::RTShader::GLSLESProgramWriter:
+ Collaboration diagram for Ogre::RTShader::GLSLESProgramWriter:

Public Member Functions

 GLSLESProgramWriter ()
 Class constructor. More...
 
virtual ~GLSLESProgramWriter ()
 Class destructor. More...
 
virtual const StringgetTargetLanguage () const
 
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 *)
 
void * operator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info More...
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, void *ptr)
 placement operator new More...
 
void * operator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info More...
 
void * operator new[] (size_t sz)
 
virtual void writeSourceCode (std::ostream &os, Program *program)
 

Static Public Attributes

static String TargetLanguage
 

Protected Types

typedef map
< FunctionInvocation, String >
::type 
FunctionMap
 
typedef FunctionMap::const_iterator FunctionMapIterator
 
typedef vector
< FunctionInvocation >::type 
FunctionVector
 
typedef
FunctionVector::const_iterator 
FunctionVectorIterator
 
typedef map< GpuConstantType,
const char * >::type 
GpuConstTypeToStringMap
 
typedef
GpuConstTypeToStringMap::const_iterator 
GpuConstTypeToStringMapIterator
 
typedef map
< Parameter::Content, const
char * >::type 
ParamContentToStringMap
 
typedef map
< Parameter::Semantic, const
char * >::type 
ParamSemanticToStringMap
 
typedef map< String, String >::type StringMap
 

Protected Member Functions

virtual void cacheDependencyFunctions (const String &libName)
 Cache functions of a dependency. More...
 
FunctionInvocationcreateInvocationFromString (const String &input)
 Create a FunctionInvocation object from a string taken out of a shader library. More...
 
void discoverFunctionDependencies (const FunctionInvocation &invoc, FunctionVector &depVector)
 Search within a function body for non-builtin functions that a given function invocation depends on. More...
 
void initializeStringMaps ()
 Initialize string maps. More...
 
bool isBasicType (String &type)
 Check if a string matches one of the GLSL ES basic types. More...
 
String processOperand (Operand op, GpuProgramType gpuType)
 
void writeFunctionTitle (std::ostream &os, Function *function)
 Write a function title. More...
 
void writeInputParameters (std::ostream &os, Function *function, GpuProgramType gpuType)
 Write the input params of the function. More...
 
void writeLocalParameter (std::ostream &os, ParameterPtr parameter)
 Write a local parameter. More...
 
void writeOutParameters (std::ostream &os, Function *function, GpuProgramType gpuType)
 Write the output params of the function. More...
 
void writeProgramDependencies (std::ostream &os, Program *program)
 Write the program dependencies. More...
 
void writeProgramTitle (std::ostream &os, Program *program)
 Write the program title. More...
 
void writeUniformParametersTitle (std::ostream &os, Program *program)
 Write the uniform parameters title. More...
 

Protected Attributes

StringMap mCachedFunctionLibraries
 
ParamContentToStringMap mContentToPerVertexAttributes
 
StringMap mDefinesMap
 
StringVector mFragInputParams
 
FunctionMap mFunctionCacheMap
 
int mGLSLVersion
 
GpuConstTypeToStringMap mGpuConstTypeMap
 
StringMap mInputToGLStatesMap
 
ParamSemanticToStringMap mParamSemanticMap
 

Detailed Description

GLSL ES target language writer implementation.

See also
ProgramWriter.

Definition at line 53 of file OgreShaderGLSLESProgramWriter.h.

Member Typedef Documentation

typedef FunctionMap::const_iterator Ogre::RTShader::GLSLESProgramWriter::FunctionMapIterator
protected

Definition at line 85 of file OgreShaderGLSLESProgramWriter.h.

typedef FunctionVector::const_iterator Ogre::RTShader::GLSLESProgramWriter::FunctionVectorIterator
protected

Definition at line 86 of file OgreShaderGLSLESProgramWriter.h.

typedef GpuConstTypeToStringMap::const_iterator Ogre::RTShader::GLSLESProgramWriter::GpuConstTypeToStringMapIterator
protected

Definition at line 87 of file OgreShaderGLSLESProgramWriter.h.

Constructor & Destructor Documentation

Ogre::RTShader::GLSLESProgramWriter::GLSLESProgramWriter ( )

Class constructor.

virtual Ogre::RTShader::GLSLESProgramWriter::~GLSLESProgramWriter ( )
virtual

Class destructor.

Member Function Documentation

virtual void Ogre::RTShader::GLSLESProgramWriter::cacheDependencyFunctions ( const String libName)
protectedvirtual

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

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr)
inlineinherited

Definition at line 96 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
void *   
)
inlineinherited

Definition at line 102 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
const char *  ,
int  ,
const char *   
)
inlineinherited

Definition at line 108 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr)
inlineinherited

Definition at line 113 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr,
const char *  ,
int  ,
const char *   
)
inlineinherited

Definition at line 119 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

operator new, with debug line info

Definition at line 68 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz)
inlineinherited

Definition at line 73 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
void *  ptr 
)
inlineinherited

placement operator new

Definition at line 79 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

array operator new, with debug line info

Definition at line 86 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz)
inlineinherited

Definition at line 91 of file OgreMemoryAllocatedObject.h.

String Ogre::RTShader::GLSLESProgramWriter::processOperand ( Operand  op,
GpuProgramType  gpuType 
)
protected
void Ogre::RTShader::ProgramWriter::writeFunctionTitle ( std::ostream &  os,
Function function 
)
protectedinherited

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 
)
protectedinherited

Write the program title.

virtual void Ogre::RTShader::GLSLESProgramWriter::writeSourceCode ( std::ostream &  os,
Program program 
)
virtual
void Ogre::RTShader::ProgramWriter::writeUniformParametersTitle ( std::ostream &  os,
Program program 
)
protectedinherited

Write the uniform parameters title.

Member Data Documentation

StringMap Ogre::RTShader::GLSLESProgramWriter::mCachedFunctionLibraries
protected

Definition at line 133 of file OgreShaderGLSLESProgramWriter.h.

ParamContentToStringMap Ogre::RTShader::GLSLESProgramWriter::mContentToPerVertexAttributes
protected

Definition at line 130 of file OgreShaderGLSLESProgramWriter.h.

StringMap Ogre::RTShader::GLSLESProgramWriter::mDefinesMap
protected

Definition at line 129 of file OgreShaderGLSLESProgramWriter.h.

StringVector Ogre::RTShader::GLSLESProgramWriter::mFragInputParams
protected

Definition at line 132 of file OgreShaderGLSLESProgramWriter.h.

FunctionMap Ogre::RTShader::GLSLESProgramWriter::mFunctionCacheMap
protected

Definition at line 128 of file OgreShaderGLSLESProgramWriter.h.

int Ogre::RTShader::GLSLESProgramWriter::mGLSLVersion
protected

Definition at line 131 of file OgreShaderGLSLESProgramWriter.h.

GpuConstTypeToStringMap Ogre::RTShader::GLSLESProgramWriter::mGpuConstTypeMap
protected

Definition at line 124 of file OgreShaderGLSLESProgramWriter.h.

StringMap Ogre::RTShader::GLSLESProgramWriter::mInputToGLStatesMap
protected

Definition at line 127 of file OgreShaderGLSLESProgramWriter.h.

ParamSemanticToStringMap Ogre::RTShader::GLSLESProgramWriter::mParamSemanticMap
protected

Definition at line 125 of file OgreShaderGLSLESProgramWriter.h.

String Ogre::RTShader::GLSLESProgramWriter::TargetLanguage
static

Definition at line 76 of file OgreShaderGLSLESProgramWriter.h.

Referenced by getTargetLanguage().


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