# Ogre::RTShader::GLSLProgramWriter Class Reference
[RTShader]

GLSL target language writer implementation. More...

`#include <OgreShaderGLSLProgramWriter.h>`

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

List of all members.

## Public Member Functions

| GLSLProgramWriter ()
| Class constructor.
virtual | ~GLSLProgramWriter ()
| 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

## Protected Member Functions

void | initializeStringMaps ()
| Initialize string maps.
void | writeLocalParameter (std::ostream &os, ParameterPtr parameter)
| Write a local parameter.
void | writeForwardDeclarations (std::ostream &os, Program *program)
| Write forward declarations.
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 | 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
ParamContentToStringMap | mContentToPerVertexAttributes
int | mGLSLVersion
StringVector | mFragInputParams

## Detailed Description

GLSL target language writer implementation.

See also:
  ProgramWriter.

Definition at line 45 of file OgreShaderGLSLProgramWriter.h.

## Member Typedef Documentation

typedef std::map<GpuConstantType, const char*> Ogre::RTShader::GLSLProgramWriter::GpuConstTypeToStringMap `[protected]`

Definition at line 91 of file OgreShaderGLSLProgramWriter.h.

typedef std::map<Parameter::Content, const char*> Ogre::RTShader::GLSLProgramWriter::ParamContentToStringMap `[protected]`

Definition at line 93 of file OgreShaderGLSLProgramWriter.h.

typedef std::map<Parameter::Semantic, const char*> Ogre::RTShader::GLSLProgramWriter::ParamSemanticToStringMap `[protected]`

Definition at line 92 of file OgreShaderGLSLProgramWriter.h.

typedef std::map<String, String> Ogre::RTShader::GLSLProgramWriter::StringMap `[protected]`

Definition at line 94 of file OgreShaderGLSLProgramWriter.h.

## Constructor & Destructor Documentation

Ogre::RTShader::GLSLProgramWriter::GLSLProgramWriter | ( |  | ) |

Class constructor.

Parameters:

  | language | The target shader language.

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

Class destructor.

## Member Function Documentation

virtual const String& Ogre::RTShader::GLSLProgramWriter::getTargetLanguage | ( |  | ) | const`[virtual]`

See also:
  ProgramWriter::getTargetLanguage.

Implements Ogre::RTShader::ProgramWriter.

Definition at line 67 of file OgreShaderGLSLProgramWriter.h.

void Ogre::RTShader::GLSLProgramWriter::initializeStringMaps | ( |  | ) | `[protected]`

Initialize string maps.

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 | ) | `[inherited]`

Definition at line 90 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.

void Ogre::RTShader::GLSLProgramWriter::writeForwardDeclarations | ( | std::ostream & | os,
|  | Program * | program |
| ) |  |  | `[protected]`

Write forward declarations.

This is needed so that we can attach library shader at a later step.

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

Write a function title.

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

Write the input params of the function.

void Ogre::RTShader::GLSLProgramWriter::writeLocalParameter | ( | std::ostream & | os,
|  | ParameterPtr | parameter |
| ) |  |  | `[protected]`

Write a local parameter.

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

Write the output params of the function.

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

Write the program title.

virtual void Ogre::RTShader::GLSLProgramWriter::writeSourceCode | ( | std::ostream & | os,
|  | Program * | program |
| ) |  |  | `[virtual]`

See also:
  ProgramWriter::writeSourceCode.

Implements Ogre::RTShader::ProgramWriter.

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

Write the uniform parameters title.

## Member Data Documentation

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

Definition at line 102 of file OgreShaderGLSLProgramWriter.h.

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

Definition at line 104 of file OgreShaderGLSLProgramWriter.h.

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

Definition at line 103 of file OgreShaderGLSLProgramWriter.h.

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

Definition at line 98 of file OgreShaderGLSLProgramWriter.h.

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

Definition at line 101 of file OgreShaderGLSLProgramWriter.h.

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

Definition at line 99 of file OgreShaderGLSLProgramWriter.h.

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

Definition at line 69 of file OgreShaderGLSLProgramWriter.h.

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

- OgreShaderGLSLProgramWriter.h

Copyright © 2008 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Wed Nov 3 2010 19:25:05