| OGRE 1.11.1 Object-Oriented Graphics Rendering Engine

Public Member Functions | List of all members
Ogre::RTShader::ProgramWriter Class Referenceabstract
Optional Components » RTShaderSystem

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...
virtual void | writeSourceCode (std::ostream &os, Program *program)=0
| Write the program shader source code. 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.

## Constructor & Destructor Documentation

## ◆ ~ProgramWriter()

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

Class destructor.

## Member Function Documentation

## ◆ 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::GLSLESProgramWriter, Ogre::RTShader::GLSLProgramWriter, and Ogre::RTShader::HLSLProgramWriter.

## ◆ 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::GLSLESProgramWriter, Ogre::RTShader::GLSLProgramWriter, and Ogre::RTShader::HLSLProgramWriter.

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

- OgreShaderProgramWriter.h