Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/Samples/Compositor/include/Compositor.h @ 3

Last change on this file since 3 was 3, checked in by anonymous, 17 years ago

=update

File size: 3.8 KB
RevLine 
[3]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-2006 Torus Knot Software Ltd
8Also see acknowledgements in Readme.html
9
10You may use this sample code for anything you like, it is not covered by the
11LGPL like the rest of the engine.
12-----------------------------------------------------------------------------
13*/
14
15#ifndef _CompositorDemo_H_
16#define _CompositorDemo_H_
17
18#include "OgreConfigFile.h"
19#include "OgreStringConverter.h"
20#include "OgreException.h"
21#include "ItemSelectorViewManager.h"
22
23#include "OgreNoMemoryMacros.h"
24#include <CEGUI/CEGUIImageset.h>
25#include <CEGUI/CEGUISystem.h>
26#include <CEGUI/CEGUILogger.h>
27#include <CEGUI/CEGUISchemeManager.h>
28#include <CEGUI/CEGUIWindowManager.h>
29#include <CEGUI/CEGUIWindow.h>
30#include <CEGUI/elements/CEGUICombobox.h>
31#include <CEGUI/elements/CEGUIListbox.h>
32#include <CEGUI/elements/CEGUIListboxTextItem.h>
33#include <CEGUI/elements/CEGUIPushButton.h>
34#include <CEGUI/elements/CEGUIScrollbar.h>
35#include "OgreMemoryMacros.h"
36
37#include "OgreCEGUIRenderer.h"
38
39//---------------------------------------------------------------------------
40    class CompositorDemo_FrameListener;
41//---------------------------------------------------------------------------
42    class CompositorDemo
43    {
44    protected:
45        Ogre::Root*                       mRoot;
46        Ogre::Camera*             mCamera;
47        Ogre::SceneManager*       mSceneMgr;
48        // the scene node of the entity
49        Ogre::SceneNode*          mMainNode;
50
51        CompositorDemo_FrameListener* mFrameListener;
52        Ogre::RenderWindow*       mWindow;
53        CEGUI::OgreCEGUIRenderer*    mGUIRenderer;
54        CEGUI::System*        mGUISystem;
55
56        size_t                            mCurrentMaterial;
57                Ogre::SceneNode * mSpinny;
58
59//        typedef std::vector< ShaderControlGUIWidget > ShaderControlContainer;
60//        typedef ShaderControlContainer::iterator ShaderControlIterator;
61
62//        ShaderControlContainer    mShaderControlContainer;
63//        MaterialControlsContainer mMaterialControlsContainer;
64
65        // These internal methods package up the stages in the startup process
66        /** Sets up the application - returns false if the user chooses to abandon configuration. */
67        bool setup(void);
68
69        /** Configures the application - returns false if the user chooses to abandon configuration. */
70        bool configure(void);
71        void chooseSceneManager(void);
72        void createCamera(void);
73        void createViewports(void);
74
75        /// Method which will define the source of resources (other than current folder)
76        void setupResources(void);
77        void loadResources(void);
78        void createScene(void);
79        void createFrameListener(void);
80        void createEffects(void);
81
82        void connectEventHandlers(void);
83        //void configureShaderControls(void);
84
85        void doErrorBox(const char* text);
86
87        bool handleQuit(const CEGUI::EventArgs& e);
88        //bool handleShaderControl(const CEGUI::EventArgs& e);
89        //bool handleShaderComboChanged(const CEGUI::EventArgs& e);
90        bool handleErrorBox(const CEGUI::EventArgs& e);
91        //void setShaderControlVal(const float val, const size_t index);
92
93    public:
94        CompositorDemo() : mRoot(0), mFrameListener(0), mGUIRenderer(0), mGUISystem(0)
95        {
96        }
97
98        ~CompositorDemo();
99
100        void go(void);
101        Ogre::Camera* getCamera(void) const { return mCamera; }
102        Ogre::SceneManager* getSceneManager(void) const { return mSceneMgr; }
103        Ogre::RenderWindow* getRenderWindow(void) const { return mWindow; }
104        Ogre::SceneNode* getMainNode(void) const { return mMainNode; }
105                CEGUI::OgreCEGUIRenderer* getGuiRenderer(void) const { return mGUIRenderer; }
106
107    };
108
109
110#endif  // end _CompositorDemo_H_
Note: See TracBrowser for help on using the repository browser.