OGRE  1.9
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgreQuake3Shader.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 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 */
28 #ifndef __QUAKE3SHADER_H__
29 #define __QUAKE3SHADER_H__
30 
31 #include "OgreResource.h"
32 #include "OgreBspPrerequisites.h"
33 #include "OgreQuake3Types.h"
34 #include "OgreCommon.h"
35 #include "OgreColourValue.h"
36 #include "OgreBlendMode.h"
37 #include "OgreTextureUnitState.h"
38 
39 namespace Ogre {
40 
41 
50  class Quake3Shader : public ResourceAlloc
51  {
52  protected:
53  String getAlternateName(const String& texName);
55 
56  public:
57 
59  Quake3Shader(const String& name);
60  ~Quake3Shader();
61 
66  MaterialPtr createAsMaterial(int lightmapNumber);
67 
68  struct Pass {
69  unsigned int flags;
72  // Multitexture blend
74  // Multipass blends (Quake3 only supports multipass?? Surely not?)
80  // TODO - alphaFunc
83  Real rgbGenParams[4]; // base, amplitude, phase, frequency
91  Real tcModStretchParams[4]; // base, amplitude, phase, frequency
93  unsigned char alphaVal;
94 
96  unsigned int animNumFrames;
98  };
99 
100  unsigned int flags;
104  bool farbox; // Skybox
106  bool skyDome;
107  Real cloudHeight; // Skydome
111 
112  bool fog;
115 
116  };
117 }
118 
119 #endif
ManualCullingMode
Manual culling modes based on vertex normals.
Definition: OgreCommon.h:150
float Real
Software floating point type.
String getAlternateName(const String &texName)
GenFunc
Class representing colour.
SceneBlendFactor
Blending factors for manually blending objects with the scene.
LayerBlendOperation blend
vector< Pass >::type PassList
LayerBlendOperation
List of valid texture blending operations, for use with TextureUnitState::setColourOperation.
Definition: OgreBlendMode.h:57
SceneBlendFactor blendSrc
TextureUnitState::TextureAddressingMode addressMode
TextureAddressingMode
Texture addressing modes - default is TAM_WRAP.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
SceneBlendFactor blendDest
TexGen
WaveType
MaterialPtr createAsMaterial(int lightmapNumber)
Creates this shader as an OGRE material.
_StringBase String
Quake3Shader(const String &name)
Default constructor - used by Quake3ShaderManager (do not call directly)
CompareFunction
Comparison functions used for the depth/stencil buffer operations and others.
Definition: OgreCommon.h:64
DeformFunc
ManualCullingMode cullMode
Class for recording Quake3 shaders.