OGRE  1.8
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgreShaderPrerequisites.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OGRE
4 (Object-oriented Graphics Rendering Engine)
5 For the latest info, see http://www.ogre3d.org
6 
7 Copyright (c) 2000-2013 Torus Knot Software Ltd
8 Permission is hereby granted, free of charge, to any person obtaining a copy
9 of this software and associated documentation files (the "Software"), to deal
10 in the Software without restriction, including without limitation the rights
11 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 copies of the Software, and to permit persons to whom the Software is
13 furnished to do so, subject to the following conditions:
14 
15 The above copyright notice and this permission notice shall be included in
16 all copies or substantial portions of the Software.
17 
18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 THE SOFTWARE.
25 -----------------------------------------------------------------------------
26 */
27 #ifndef __ShaderPrerequisites_H__
28 #define __ShaderPrerequisites_H__
29 
30 #include "OgrePrerequisites.h"
31 #include "OgreCommon.h"
32 
33 namespace Ogre
34 {
35 
37 class Technique;
38 class Pass;
39 class Renderable;
40 class Viewport;
41 class RenderObjectListener;
42 class TextureUnitState;
43 class Frustum;
44 class ScriptTranslator;
45 class ScriptCompiler;
46 class PropertyAbstractNode;
48 
50 
51 namespace RTShader
52 {
53 
55 class RenderState;
56 class TargetRenderState;
57 class SubRenderState;
58 class SubRenderStateAccessor;
59 class SubRenderStateFactory;
60 class ProgramManager;
61 class Program;
62 class ProgramProcessor;
63 class ProgramSet;
64 class RenderState;
65 class Parameter;
66 class Function;
67 class FFPRenderStateBuilder;
68 class ShaderGenerator;
69 class SGMaterialSerializerListener;
70 class ProgramWriterFactory;
71 class ProgramWriterManager;
72 
74 template <class T>
75 inline 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
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 
uint32 _OgreExport FastHash(const char *data, int len, uint32 hashSoFar=0)
Fast general hashing algorithm.
unsigned int uint32
Definition: OgrePlatform.h:270
void sh_hash_combine(uint32 &seed, T const &v)
Utility function with same style as boost::hash_combine.
Class for serializing Materials to / from a .material script.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
GeneralAllocatedObject RTShaderSystemAlloc