OGRE  2.0
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-2014 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 UniformParameter;
67 class Function;
68 class FFPRenderStateBuilder;
69 class ShaderGenerator;
70 class SGMaterialSerializerListener;
71 class ProgramWriterFactory;
73 
77 
79 template <class T>
80 inline void sh_hash_combine(uint32& seed, T const& v)
81 {
82  seed ^= FastHash((const char*)&v, sizeof(T)) + 0x9e3779b9 + (seed<<6) + (seed>>2);
83 }
84 
85 // Vertex shader output parameters compact policy.
87 {
88  VSOCP_LOW = 0, // VS Outputs will be compacted just in case the maximum slot count exceeded.
89  VSOCP_MEDIUM = 1, // VS Outputs will be compacted always without parameter splits.
90  VSOCP_HIGH = 2 // VS Outputs will be compacted always including parameter splits.
91 };
92 
94 {
97 };
98 
99 
100 }
101 }
102 
103 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 || OGRE_PLATFORM == OGRE_PLATFORM_WINRT
104 # if defined( OGRE_STATIC_LIB )
105 # define _OgreRTSSExport
106 # else
107 # if defined( OgreRTShaderSystem_EXPORTS )
108 # define _OgreRTSSExport __declspec( dllexport )
109 # else
110 # if defined( __MINGW32__ )
111 # define _OgreRTSSExport
112 # else
113 # define _OgreRTSSExport __declspec( dllimport )
114 # endif
115 # endif
116 # endif
117 #elif defined ( OGRE_GCC_VISIBILITY )
118 # define _OgreRTSSExport __attribute__ ((visibility("default")))
119 #else
120 # define _OgreRTSSExport
121 #endif
122 
123 
124 #endif
125 
uint32 _OgreExport FastHash(const char *data, int len, uint32 hashSoFar=0)
Fast general hashing algorithm.
unsigned int uint32
Definition: OgrePlatform.h:420
void sh_hash_combine(uint32 &seed, T const &v)
Utility function with same style as boost::hash_combine.
SharedPtr< Parameter > ParameterPtr
Class for serializing Materials to / from a .material script.
vector< ParameterPtr >::type ShaderParameterList
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
GeneralAllocatedObject RTShaderSystemAlloc
SharedPtr< UniformParameter > UniformParameterPtr