Ogre::RTShader::GLSLESProgramWriter Class Reference
RTShader

GLSL ES target language writer implementation. More...

`#include <OgreShaderGLSLESProgramWriter.h>`

Inheritance diagram for Ogre::RTShader::GLSLESProgramWriter:
[legend]

List of all members.

## Public Member Functions

| GLSLESProgramWriter ()
| Class constructor.
virtual | ~GLSLESProgramWriter ()
| Class destructor.
virtual void | writeSourceCode (StringSerialiser &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 (StringSerialiser &os, Program *program)
| Write the program dependencies.
void | writeLocalParameter (StringSerialiser &os, ParameterPtr parameter)
| Write a local parameter.
void | writeInputParameters (StringSerialiser &os, Function *function, GpuProgramType gpuType)
| Write the input params of the function.
void | writeOutParameters (StringSerialiser &os, Function *function, GpuProgramType gpuType)
| Write the output params of the function.
void | writeAssignFunction (StringSerialiser &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 (StringSerialiser &os, Program *program)
| Write the program title.
void | writeUniformParametersTitle (StringSerialiser &os, Program *program)
| Write the uniform parameters title.
void | writeFunctionTitle (StringSerialiser &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

## Detailed Description

GLSL ES target language writer implementation.

See also:
  ProgramWriter.

Definition at line 45 of file OgreShaderGLSLESProgramWriter.h.

## Member Typedef Documentation

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.

## Constructor & Destructor Documentation

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

Class constructor.

Parameters:

  language | The target shader language.

virtual Ogre::RTShader::GLSLESProgramWriter::~GLSLESProgramWriter | ( |  | ) | `[virtual]`

Class destructor.

## Member Function Documentation

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]`

See also:
  ProgramWriter::getTargetLanguage.

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.

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr | ) | `[inherited]`

Definition at line 95 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | void * |
| ) |  | `[inherited]`

Definition at line 101 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | const char * | ,
|  | int | ,
|  | const char * |
| ) |  | `[inherited]`

Definition at line 107 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr | ) | `[inherited]`

Definition at line 112 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr,
|  | const char * | ,
|  | int | ,
|  | const char * |
| ) |  | `[inherited]`

Definition at line 118 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

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.

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz | ) | `[inherited]`

Definition at line 72 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz,
|  | void * | ptr
| ) |  | `[inherited]`

placement operator new

Definition at line 78 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

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.

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz | ) | `[inherited]`

Definition at line 90 of file OgreMemoryAllocatedObject.h.

String Ogre::RTShader::GLSLESProgramWriter::processOperand | ( | Operand | op,
|  | GpuProgramType | gpuType
| ) |  | `[protected]`

void Ogre::RTShader::GLSLESProgramWriter::writeAssignFunction | ( | StringSerialiser & | os,
|  | FunctionInvocation::OperandVector::iterator | itOperand,
|  | FunctionInvocation::OperandVector::iterator | itOperandEnd,
|  | GpuProgramType | gpuType
| ) |  | `[protected]`

void Ogre::RTShader::ProgramWriter::writeFunctionTitle | ( | StringSerialiser & | os,
|  | Function * | function
| ) |  | `[protected, inherited]`

Write a function title.

void Ogre::RTShader::GLSLESProgramWriter::writeInputParameters | ( | StringSerialiser & | os,
|  | Function * | function,
|  | GpuProgramType | gpuType
| ) |  | `[protected]`

Write the input params of the function.

void Ogre::RTShader::GLSLESProgramWriter::writeLocalParameter | ( | StringSerialiser & | os,
|  | ParameterPtr | parameter
| ) |  | `[protected]`

Write a local parameter.

void Ogre::RTShader::GLSLESProgramWriter::writeOutParameters | ( | StringSerialiser & | os,
|  | Function * | function,
|  | GpuProgramType | gpuType
| ) |  | `[protected]`

Write the output params of the function.

void Ogre::RTShader::GLSLESProgramWriter::writeProgramDependencies | ( | StringSerialiser & | os,
|  | Program * | program
| ) |  | `[protected]`

Write the program dependencies.

void Ogre::RTShader::ProgramWriter::writeProgramTitle | ( | StringSerialiser & | os,
|  | Program * | program
| ) |  | `[protected, inherited]`

Write the program title.

virtual void Ogre::RTShader::GLSLESProgramWriter::writeSourceCode | ( | StringSerialiser & | os,
|  | Program * | program
| ) |  | `[virtual]`

See also:
  ProgramWriter::writeSourceCode.

Implements Ogre::RTShader::ProgramWriter.

void Ogre::RTShader::ProgramWriter::writeUniformParametersTitle | ( | StringSerialiser & | os,
|  | Program * | program
| ) |  | `[protected, inherited]`

Write the uniform parameters title.

## Member Data Documentation

StringMap Ogre::RTShader::GLSLESProgramWriter::mCachedFunctionLibraries `[protected]`

Definition at line 161 of file OgreShaderGLSLESProgramWriter.h.

ParamContentToStringMap Ogre::RTShader::GLSLESProgramWriter::mContentToPerVertexAttributes `[protected]`

Definition at line 155 of file OgreShaderGLSLESProgramWriter.h.

StringMap Ogre::RTShader::GLSLESProgramWriter::mDefinesMap `[protected]`

Definition at line 153 of file OgreShaderGLSLESProgramWriter.h.

StringVector Ogre::RTShader::GLSLESProgramWriter::mFragInputParams `[protected]`

Definition at line 159 of file OgreShaderGLSLESProgramWriter.h.

FunctionMap Ogre::RTShader::GLSLESProgramWriter::mFunctionCacheMap `[protected]`

Definition at line 151 of file OgreShaderGLSLESProgramWriter.h.

int Ogre::RTShader::GLSLESProgramWriter::mGLSLVersion `[protected]`

Definition at line 157 of file OgreShaderGLSLESProgramWriter.h.

GpuConstTypeToStringMap Ogre::RTShader::GLSLESProgramWriter::mGpuConstTypeMap `[protected]`

Definition at line 144 of file OgreShaderGLSLESProgramWriter.h.

StringMap Ogre::RTShader::GLSLESProgramWriter::mInputToGLStatesMap `[protected]`

Definition at line 149 of file OgreShaderGLSLESProgramWriter.h.

ParamSemanticToStringMap Ogre::RTShader::GLSLESProgramWriter::mParamSemanticMap `[protected]`

Definition at line 146 of file OgreShaderGLSLESProgramWriter.h.

String Ogre::RTShader::GLSLESProgramWriter::TargetLanguage `[static]`

Definition at line 73 of file OgreShaderGLSLESProgramWriter.h.

Referenced by getTargetLanguage().

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

- OgreShaderGLSLESProgramWriter.h

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Sun Sep 2 2012 07:28:05