OGRE  1.9.0
OgreShaderPrerequisites.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-2014 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 __ShaderPrerequisites_H__
28#define __ShaderPrerequisites_H__
29
30#include "OgrePrerequisites.h"
31#include "OgreCommon.h"
32
33namespace Ogre
34{
35
37class Technique;
38class Pass;
39class Renderable;
40class Viewport;
41class RenderObjectListener;
42class TextureUnitState;
43class Frustum;
44class ScriptTranslator;
45class ScriptCompiler;
46class PropertyAbstractNode;
47class MaterialSerializer;
48
50
51namespace RTShader
52{
53
55class RenderState;
56class TargetRenderState;
57class SubRenderState;
58class SubRenderStateAccessor;
59class SubRenderStateFactory;
60class ProgramManager;
61class Program;
62class ProgramProcessor;
63class ProgramSet;
64class RenderState;
65class Parameter;
66class Function;
67class FFPRenderStateBuilder;
68class ShaderGenerator;
69class SGMaterialSerializerListener;
70class ProgramWriterFactory;
71class ProgramWriterManager;
72
74template <class T>
75inline void sh_hash_combine(uint32& seed, T const& v)
76{
77 seed ^= FastHash((const char*)&v, sizeof(T)) + 0x9e3779b9 + (seed<<6) + (seed>>2);
78}
79
80// Vertex shader output parameters compact policy.
82{
83 VSOCP_LOW = 0, // VS Outputs will be compacted just in case the maximum slot count exceeded.
84 VSOCP_MEDIUM = 1, // VS Outputs will be compacted always without parameter splits.
85 VSOCP_HIGH = 2 // VS Outputs will be compacted always including parameter splits.
86};
87
89{
92};
93
94
95}
96}
97
98#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 || OGRE_PLATFORM == OGRE_PLATFORM_WINRT
99# if defined( OGRE_STATIC_LIB )
100# define _OgreRTSSExport
101# else
102# if defined( OgreRTShaderSystem_EXPORTS )
103# define _OgreRTSSExport __declspec( dllexport )
104# else
105# if defined( __MINGW32__ )
106# define _OgreRTSSExport
107# else
108# define _OgreRTSSExport __declspec( dllimport )
109# endif
110# endif
111# endif
112#elif defined ( OGRE_GCC_VISIBILITY )
113# define _OgreRTSSExport __attribute__ ((visibility("default")))
114#else
115# define _OgreRTSSExport
116#endif
117
118
119#endif
120
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Reference-counted shared pointer, used for objects where implicit destruction is required.
uint32 _OgreExport FastHash(const char *data, int len, uint32 hashSoFar=0)
Fast general hashing algorithm.
void sh_hash_combine(uint32 &seed, T const &v)
Utility function with same style as boost::hash_combine.
GeneralAllocatedObject RTShaderSystemAlloc