Ogre::RTShader::ProgramWriter Class Referenceabstract
Core » RTShader

Base class interface for shader program writers. More...

`#include <OgreShaderProgramWriter.h>`

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

## Public Member Functions

virtual | ~ProgramWriter ()
| Class destructor. More...
virtual const String & | getTargetLanguage () const =0
| Return the target language of this writer. More...
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)=0
| Write the program shader source code. More...

## Protected Member Functions

void | writeFunctionTitle (std::ostream &os, Function *function)
| Write a function title. 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...

## Detailed Description

Base class interface for shader program writers.

The main usage of this class is to generate a shader source code from the given CPU program. In order to support specific shader language one should subclass this interface and implement the pure methods.

Definition at line 52 of file OgreShaderProgramWriter.h.

## Constructor & Destructor Documentation

## ~ProgramWriter()

virtual Ogre::RTShader::ProgramWriter::~ProgramWriter | ( |  | ) |

virtual

Class destructor.

Definition at line 58 of file OgreShaderProgramWriter.h.

## Member Function Documentation

## getTargetLanguage()

virtual const String& Ogre::RTShader::ProgramWriter::getTargetLanguage | ( |  | ) | const

pure virtual

Return the target language of this writer.

Implemented in Ogre::RTShader::CGProgramWriter, Ogre::RTShader::HLSLProgramWriter, Ogre::RTShader::GLSLESProgramWriter, and Ogre::RTShader::GLSLProgramWriter.

## operator delete() [1/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr | ) |

inherited

Definition at line 96 of file OgreMemoryAllocatedObject.h.

## operator delete() [2/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | void * |
| ) |  |

inherited

Definition at line 102 of file OgreMemoryAllocatedObject.h.

## operator delete() [3/3]

template<class Alloc >

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

inherited

Definition at line 108 of file OgreMemoryAllocatedObject.h.

## operator delete[]() [1/2]

template<class Alloc >

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

inherited

Definition at line 113 of file OgreMemoryAllocatedObject.h.

## operator delete[]() [2/2]

template<class Alloc >

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

inherited

Definition at line 119 of file OgreMemoryAllocatedObject.h.

## operator new() [1/3]

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 68 of file OgreMemoryAllocatedObject.h.

## operator new() [2/3]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz | ) |

inherited

Definition at line 73 of file OgreMemoryAllocatedObject.h.

## operator new() [3/3]

template<class Alloc >

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

inherited

placement operator new

Definition at line 79 of file OgreMemoryAllocatedObject.h.

## operator new[]() [1/2]

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 86 of file OgreMemoryAllocatedObject.h.

## operator new[]() [2/2]

template<class Alloc >

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

inherited

Definition at line 91 of file OgreMemoryAllocatedObject.h.

## writeFunctionTitle()

void Ogre::RTShader::ProgramWriter::writeFunctionTitle | ( | std::ostream & | os,
|  | Function * | function
| ) |  |

protected

Write a function title.

## writeProgramTitle()

void Ogre::RTShader::ProgramWriter::writeProgramTitle | ( | std::ostream & | os,
|  | Program * | program
| ) |  |

protected

Write the program title.

## writeSourceCode()

virtual void Ogre::RTShader::ProgramWriter::writeSourceCode | ( | std::ostream & | os,
|  | Program * | program
| ) |  |

pure virtual

Write the program shader source code.

Parameters

  os | The output stream to write to code into.
  program | The source CPU program for the GPU program code.

Implemented in Ogre::RTShader::CGProgramWriter, Ogre::RTShader::HLSLProgramWriter, Ogre::RTShader::GLSLESProgramWriter, and Ogre::RTShader::GLSLProgramWriter.

## writeUniformParametersTitle()

void Ogre::RTShader::ProgramWriter::writeUniformParametersTitle | ( | std::ostream & | os,
|  | Program * | program
| ) |  |

protected

Write the uniform parameters title.

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

- OgreShaderProgramWriter.h

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.