OGRE  2.0
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgreCompositorPassQuadDef.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 
29 #ifndef __CompositorPassQuadDef_H__
30 #define __CompositorPassQuadDef_H__
31 
32 #include "OgreHeaderPrefix.h"
33 
34 #include "../OgreCompositorPassDef.h"
35 #include "OgreCommon.h"
36 
37 namespace Ogre
38 {
39  class CompositorNodeDef;
40 
49  {
50  public:
52  {
54  size_t texUnitIdx;
58  size_t mrtIndex;
59 
60  QuadTextureSource( size_t _texUnitIdx, IdString _textureName, size_t _mrtIndex ) :
61  texUnitIdx( _texUnitIdx ), textureName( _textureName ), mrtIndex( _mrtIndex ) {}
62  };
64 
65  protected:
68 
69  public:
71  {
75  };
76 
80  bool mUseQuad;
81 
88  bool mIsResolve;
89 
91 
97 
98  CompositorPassQuadDef( CompositorNodeDef *parentNodeDef, uint32 rtIndex ) :
99  CompositorPassDef( PASS_QUAD, rtIndex ),
100  mParentNodeDef( parentNodeDef ),
101  mUseQuad( false ),
102  mIsResolve( false ),
103  mFrustumCorners( NO_CORNERS )
104  {
105  }
106 
110  void addQuadTextureSource( size_t texUnitIdx, const String &textureName, size_t mrtIndex );
111 
112  const TextureSources& getTextureSources(void) const { return mTextureSources; }
113  };
114 
117 }
118 
119 #include "OgreHeaderSuffix.h"
120 
121 #endif
unsigned int uint32
Definition: OgrePlatform.h:420
#define _OgreExport
Definition: OgrePlatform.h:255
Compositor nodes are the core subject of compositing.
size_t texUnitIdx
Index of texture unit state to change.
vector< QuadTextureSource >::type TextureSources
const TextureSources & getTextureSources(void) const
CompositorPassQuadDef(CompositorNodeDef *parentNodeDef, uint32 rtIndex)
Hashed string.
Definition: OgreIdString.h:94
size_t mrtIndex
Index in case of MRT. Ignored if textureSource isn't mrt.
IdString textureName
Name of the texture (can come from input channel, local textures, or global ones) ...
Interface to abstract all types of pass definitions (.
FrustumCorners mFrustumCorners
Type of frustum corners to pass in the quad normals.
_StringBase String
Definition: OgreCommon.h:53
bool mIsResolve
When true, the user is telling Ogre this pass just performs a custom FSAA resolve filter...
QuadTextureSource(size_t _texUnitIdx, IdString _textureName, size_t _mrtIndex)
bool mUseQuad
Whether to use a full screen quad or triangle.