OGRE  2.0
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgreCompositorPassDef.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 __CompositorPassDef_H__
30 #define __CompositorPassDef_H__
31 
32 #include "OgreHeaderPrefix.h"
33 
34 #include "OgreIdString.h"
35 #include "OgrePrerequisites.h"
36 
37 namespace Ogre
38 {
39  class CompositorNodeDef;
40 
48  {
56  };
57 
74  {
76 
79 
80  public:
82  float mVpLeft;
83  float mVpTop;
84  float mVpWidth;
85  float mVpHeight;
86 
89 
92 
95 
101 
106 
107  public:
109  mPassType( passType ), mRtIndex( rtIndex ),
110  mVpLeft( 0 ), mVpTop( 0 ),
111  mVpWidth( 1 ), mVpHeight( 1 ), mShadowMapIdx( 0 ),
112  mNumInitialPasses( -1 ), mIdentifier( 0 ),
113  mBeginRtUpdate( true ), mEndRtUpdate( true ),
114  mIncludeOverlays( false ) {}
115  virtual ~CompositorPassDef() {}
116 
117  CompositorPassType getType() const { return mPassType; }
118  uint32 getRtIndex(void) const { return mRtIndex; }
119  };
120 
122 
124  {
128 
131 
133 
134  public:
135  CompositorTargetDef( IdString renderTargetName, uint32 rtIndex,
136  CompositorNodeDef *parentNodeDef ) :
137  mRenderTargetName( renderTargetName ),
138  mRtIndex( rtIndex ),
139  mParentNodeDef( parentNodeDef ) {}
141 
142  IdString getRenderTargetName() const { return mRenderTargetName; }
143 
150  void setNumPasses( size_t numPasses ) { mCompositorPasses.reserve( numPasses ); }
151 
152  CompositorPassDef* addPass( CompositorPassType passType, IdString customId = IdString() );
153 
154  const CompositorPassDefVec& getCompositorPasses() const { return mCompositorPasses; }
155 
157  CompositorPassDefVec& getCompositorPassesNonConst() { return mCompositorPasses; }
158  };
159 
162 }
163 
164 #include "OgreHeaderSuffix.h"
165 
166 #endif
uint32 mIdentifier
Custom value in case there's a listener attached (to identify the pass)
unsigned int uint32
Definition: OgrePlatform.h:420
#define _OgreExport
Definition: OgrePlatform.h:255
const CompositorPassDefVec & getCompositorPasses() const
Compositor nodes are the core subject of compositing.
CompositorNodeDef * mParentNodeDef
bool mEndRtUpdate
End if we're the last consecutive pass to alter the contents of the same render target.
CompositorPassDefVec mCompositorPasses
CompositorPassDefVec & getCompositorPassesNonConst()
getNodeDefinition.
CompositorTargetDef(IdString renderTargetName, uint32 rtIndex, CompositorNodeDef *parentNodeDef)
bool mIncludeOverlays
TODO: Refactor OgreOverlay to remove this design atrocity.
CompositorPassType mPassType
IdString mRenderTargetName
Name is local to Node! (unless using 'global_' prefix)
CompositorPassDef(CompositorPassType passType, uint32 rtIndex)
CompositorPassType getType() const
uint32 mNumInitialPasses
Number of times to perform the pass before stopping. -1 to never stop.
uint32 getRtIndex(void) const
uint32 mShadowMapIdx
Shadow map index it belongs to (only filled in passes owned by Shadow Nodes)
IdString getRenderTargetName() const
vector< CompositorPassDef * >::type CompositorPassDefVec
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Hashed string.
Definition: OgreIdString.h:94
bool mBeginRtUpdate
True if a previous pass doesn't alter the contents of the same render target we do TODO: Fill this au...
Interface to abstract all types of pass definitions (.
float mVpLeft
Viewport's region to draw.
void setNumPasses(size_t numPasses)
Reserves enough memory for all passes (efficient allocation)
uint32 mRtIndex
Used for cubemaps and 3D textures.