OpenWalnut  1.5.0dev
WGEOffscreenFinalPass.h
1 //---------------------------------------------------------------------------
2 //
3 // Project: OpenWalnut ( http://www.openwalnut.org )
4 //
5 // Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
6 // For more information see http://www.openwalnut.org/copying
7 //
8 // This file is part of OpenWalnut.
9 //
10 // OpenWalnut is free software: you can redistribute it and/or modify
11 // it under the terms of the GNU Lesser General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // OpenWalnut is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public License
21 // along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
22 //
23 //---------------------------------------------------------------------------
24 
25 #ifndef WGEOFFSCREENFINALPASS_H
26 #define WGEOFFSCREENFINALPASS_H
27 
28 #include <string>
29 
30 #include <osg/Geode>
31 #include <osg/TexMat>
32 
33 #include "WGEOffscreenTexturePass.h"
34 
35 class WGETextureHud;
36 
37 /**
38  * This class is basically a WGEOffscreenTexturePass with the difference that it finally renders to the on-screen frame buffer.
39  */
41 {
42 public:
43  /**
44  * Convenience typedef for an osg::ref_ptr
45  */
46  typedef osg::ref_ptr< WGEOffscreenFinalPass > RefPtr;
47 
48  /**
49  * Convenience typedef for an osg::ref_ptr; const
50  */
51  typedef osg::ref_ptr< const WGEOffscreenFinalPass > ConstRefPtr;
52 
53  /**
54  * Creates a new rendering pass instance which actually renders on a full-screen quad.
55  *
56  * \param textureWidth the width of all the textures created and used by this render pass. This should be large enough for every reasonable
57  * viewport size.
58  * \param textureHeight the height of all the textures created and used by this render pass. This should be large enough for every reasonable
59  * viewport size.*
60  * \param num the order number. This camera gets rendered at the num'th place in the pre render queue of the subgraph it is attached to.
61  */
62  WGEOffscreenFinalPass( size_t textureWidth, size_t textureHeight, int num = 0 );
63 
64  /**
65  * Creates a new rendering pass instance which actually renders on a full-screen quad.
66  *
67  * \param textureWidth the width of all the textures created and used by this render pass. This should be large enough for every reasonable
68  * viewport size.
69  * \param textureHeight the height of all the textures created and used by this render pass. This should be large enough for every reasonable
70  * viewport size.*
71  * \param num the order number. This camera gets rendered at the num'th place in the pre render queue of the subgraph it is attached to.
72  * \param hud the hud that gets notified about attached and detached textures. Useful for debugging.
73  * \param name the name of this render pass. This is a nice debugging feature in conjunction with WGETextureHud as it gets displayed there.
74  */
75  WGEOffscreenFinalPass( size_t textureWidth, size_t textureHeight, osg::ref_ptr< WGETextureHud > hud, std::string name, int num = 0 );
76 
77  /**
78  * Destructor.
79  */
80  virtual ~WGEOffscreenFinalPass();
81 
82 protected:
83 private:
84 };
85 
86 #endif // WGEOFFSCREENFINALPASS_H
87 
This class is basically a WGEOffscreenTexturePass with the difference that it finally renders to the ...
virtual ~WGEOffscreenFinalPass()
Destructor.
osg::ref_ptr< const WGEOffscreenFinalPass > ConstRefPtr
Convenience typedef for an osg::ref_ptr; const.
WGEOffscreenFinalPass(size_t textureWidth, size_t textureHeight, int num=0)
Creates a new rendering pass instance which actually renders on a full-screen quad.
osg::ref_ptr< WGEOffscreenFinalPass > RefPtr
Convenience typedef for an osg::ref_ptr.
This class encapsulates an OSG Camera and a corresponding framebuffer object.
This class implements a HUD showing several textures on screen.
Definition: WGETextureHud.h:47