Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/ogre_src_v1-9-0/OgreMain/include/OgreCompositionTargetPass.h @ 148

Last change on this file since 148 was 148, checked in by patricwi, 6 years ago

Added new dependencies for ogre1.9 and cegui0.8

File size: 5.6 KB
Line 
1/*
2-----------------------------------------------------------------------------
3This source file is part of OGRE
4    (Object-oriented Graphics Rendering Engine)
5For the latest info, see http://www.ogre3d.org/
6
7Copyright (c) 2000-2013 Torus Knot Software Ltd
8
9Permission is hereby granted, free of charge, to any person obtaining a copy
10of this software and associated documentation files (the "Software"), to deal
11in the Software without restriction, including without limitation the rights
12to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13copies of the Software, and to permit persons to whom the Software is
14furnished to do so, subject to the following conditions:
15
16The above copyright notice and this permission notice shall be included in
17all copies or substantial portions of the Software.
18
19THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25THE SOFTWARE.
26-----------------------------------------------------------------------------
27*/
28#ifndef __CompositionTargetPass_H__
29#define __CompositionTargetPass_H__
30
31#include "OgrePrerequisites.h"
32#include "OgreIteratorWrappers.h"
33#include "OgreHeaderPrefix.h"
34
35namespace Ogre {
36        /** \addtogroup Core
37        *  @{
38        */
39        /** \addtogroup Effects
40        *  @{
41        */
42        /** Object representing one render to a RenderTarget or Viewport in the Ogre Composition
43                framework.
44         */
45        class _OgreExport CompositionTargetPass : public CompositorInstAlloc
46    {
47    public:
48        CompositionTargetPass(CompositionTechnique *parent);
49        ~CompositionTargetPass();
50       
51        /** Input mode of a TargetPass
52        */
53        enum InputMode
54        {
55            IM_NONE,        /// No input
56            IM_PREVIOUS     /// Output of previous Composition in chain
57        };
58        typedef vector<CompositionPass *>::type Passes;
59        typedef VectorIterator<Passes> PassIterator;
60       
61        /** Set input mode of this TargetPass
62        */
63        void setInputMode(InputMode mode);
64        /** Get input mode */
65        InputMode getInputMode() const;
66       
67        /** Set output local texture name */
68        void setOutputName(const String &out);
69        /** Get output local texture name */
70        const String &getOutputName() const;
71       
72        /** Set "only initial" flag. This makes that this target pass is only executed initially
73            after the effect has been enabled.
74        */
75        void setOnlyInitial(bool value);
76        /** Get "only initial" flag.
77        */
78        bool getOnlyInitial();
79       
80        /** Set the scene visibility mask used by this pass
81        */
82        void setVisibilityMask(uint32 mask);
83        /** Get the scene visibility mask used by this pass
84        */
85        uint32 getVisibilityMask();
86
87                /** Set the material scheme used by this target pass.
88                @remarks
89                        Only applicable to targets that render the scene as
90                        one of their passes.
91                        @see Technique::setScheme.
92                */
93                void setMaterialScheme(const String& schemeName);
94                /** Get the material scheme used by this target pass.
95                @remarks
96                        Only applicable to targets that render the scene as
97                        one of their passes.
98                        @see Technique::setScheme.
99                */
100                const String& getMaterialScheme(void) const;
101       
102                /** Set whether shadows are enabled in this target pass.
103                @remarks
104                        Only applicable to targets that render the scene as
105                        one of their passes.
106                */
107                void setShadowsEnabled(bool enabled);
108                /** Get whether shadows are enabled in this target pass.
109                @remarks
110                        Only applicable to targets that render the scene as
111                        one of their passes.
112                */
113                bool getShadowsEnabled(void) const;
114        /** Set the scene LOD bias used by this pass. The default is 1.0,
115            everything below that means lower quality, higher means higher quality.
116        */
117        void setLodBias(float bias);
118        /** Get the scene LOD bias used by this pass
119        */
120        float getLodBias();
121       
122        /** Create a new pass, and return a pointer to it.
123        */
124        CompositionPass *createPass();
125        /** Remove a pass. It will also be destroyed.
126        */
127        void removePass(size_t idx);
128        /** Get a pass.
129        */
130        CompositionPass *getPass(size_t idx);
131        /** Get the number of passes.
132        */
133        size_t getNumPasses();
134       
135        /** Remove all passes
136        */
137        void removeAllPasses();
138   
139        /** Get an iterator over the Passes in this TargetPass. */
140        PassIterator getPassIterator(void);
141       
142        /** Get parent object */
143        CompositionTechnique *getParent();
144
145        /** Determine if this target pass is supported on the current rendering device.
146         */
147        bool _isSupported(void);
148
149    private:
150        /// Parent technique
151        CompositionTechnique *mParent;
152        /// Input mode
153        InputMode mInputMode;
154        /// (local) output texture
155        String mOutputName;
156        /// Passes
157        Passes mPasses;
158        /// This target pass is only executed initially after the effect
159        /// has been enabled.
160        bool mOnlyInitial;
161        /// Visibility mask for this render
162        uint32 mVisibilityMask;
163        /// LOD bias of this render
164        float mLodBias;
165                /// Material scheme name
166                String mMaterialScheme;
167                /// Shadows option
168                bool mShadowsEnabled;
169    };
170
171        /** @} */
172        /** @} */
173}
174
175#include "OgreHeaderSuffix.h"
176
177#endif
Note: See TracBrowser for help on using the repository browser.