OgreShaderProgramWriter.h
Go to the documentation of this file.
1/*
2-----------------------------------------------------------------------------
3This source file is part of OGRE
4(Object-oriented Graphics Rendering Engine)
5For the latest info, see http://www.ogre3d.org
6
7Copyright (c) 2000-2013 Torus Knot Software Ltd
8Permission is hereby granted, free of charge, to any person obtaining a copy
9of this software and associated documentation files (the "Software"), to deal
10in the Software without restriction, including without limitation the rights
11to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12copies of the Software, and to permit persons to whom the Software is
13furnished to do so, subject to the following conditions:
14
15The above copyright notice and this permission notice shall be included in
16all copies or substantial portions of the Software.
17
18THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24THE SOFTWARE.
25-----------------------------------------------------------------------------
26*/
27#ifndef _ShaderProgramWriter_
28#define _ShaderProgramWriter_
29
31#include "OgreGpuProgram.h"
32#include "OgreString.h"
33#include "OgreShaderProgram.h"
34#include "OgreShaderParameter.h"
35#include "OgreShaderFunction.h"
36
37namespace Ogre {
38namespace RTShader {
39
53{
54// Interface.
55public:
56
58 virtual ~ProgramWriter () {}
59
60
65 virtual void writeSourceCode (std::ostream& os, Program* program) = 0;
66
68 virtual const String& getTargetLanguage () const = 0;
69
70// Protected methods.
71protected:
73 void writeProgramTitle (std::ostream& os, Program* program);
74
76 void writeUniformParametersTitle (std::ostream& os, Program* program);
77
79 void writeFunctionTitle (std::ostream& os, Function* function);
80};
81
85}
86}
87
88
89
90#endif
#define _OgreRTSSExport
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
A class that represents a shader based program function.
Base class interface for shader program writers.
void writeFunctionTitle(std::ostream &os, Function *function)
Write a function title.
virtual void writeSourceCode(std::ostream &os, Program *program)=0
Write the program shader source code.
void writeProgramTitle(std::ostream &os, Program *program)
Write the program title.
virtual ~ProgramWriter()
Class destructor.
void writeUniformParametersTitle(std::ostream &os, Program *program)
Write the uniform parameters title.
virtual const String & getTargetLanguage() const =0
Return the target language of this writer.
A class that represents a shader based program.
Reference-counted shared pointer, used for objects where implicit destruction is required.
_StringBase String

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