Crazy Eddie's GUI System  ${CEGUI_VERSION}
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
CEGuiD3D9BaseApplication.h
1 /***********************************************************************
2  created: 24/9/2004
3  author: Paul D Turner
4 *************************************************************************/
5 /***************************************************************************
6  * Copyright (C) 2004 - 2009 Paul D Turner & The CEGUI Development Team
7  *
8  * Permission is hereby granted, free of charge, to any person obtaining
9  * a copy of this software and associated documentation files (the
10  * "Software"), to deal in the Software without restriction, including
11  * without limitation the rights to use, copy, modify, merge, publish,
12  * distribute, sublicense, and/or sell copies of the Software, and to
13  * permit persons to whom the Software is furnished to do so, subject to
14  * the following conditions:
15  *
16  * The above copyright notice and this permission notice shall be
17  * included in all copies or substantial portions of the Software.
18  *
19  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22  * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
23  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
24  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25  * OTHER DEALINGS IN THE SOFTWARE.
26  ***************************************************************************/
27 #ifndef _CEGuiD3D9BaseApplication_h_
28 #define _CEGuiD3D9BaseApplication_h_
29 
30 #include "CEGuiBaseApplication.h"
31 #include "CEGUI/GeometryBuffer.h"
32 
33 #if defined( __WIN32__ ) || defined( _WIN32 )
34 # define WIN32_LEAN_AND_MEAN
35 # include <windows.h>
36 
37 // undefine Microsoft macro evilness
38 # undef min
39 # undef max
40 #endif
41 
42 struct CEGuiBaseApplication9Impl;
43 
44 
46 {
47 public:
50 
53 
54  void destroyRenderer();
55 
56 protected:
57  /*************************************************************************
58  Implementation Methods
59  *************************************************************************/
64  bool initialiseDirect3D(unsigned int width, unsigned int height, unsigned int adapter, bool windowed);
65 
74  bool resetDirect3D(void);
75 
76  // Implementation of base class abstract methods.
77  void run();
78  void destroyWindow();
79  void beginRendering(const float elapsed);
80  void endRendering();
81 
82  /*************************************************************************
83  Data fields
84  *************************************************************************/
85  CEGuiBaseApplication9Impl* pimpl;
86 
87  // counter used to track elapsed time
88  DWORD d_lastFrameTime;
89 };
90 
91 #endif // end of guard _CEGuiD3D9BaseApplication_h_
bool resetDirect3D(void)
Do reset of Direct3D device.
CEGuiD3D9BaseApplication()
Constructor.
void beginRendering(const float elapsed)
Implementation function to perform required pre-render operations.
void run()
The abstract function for running the application.
void destroyWindow()
The abstract function for destroying the renderer and the window.
void endRendering()
Implementation function to perform required post-render operations.
Base application abstract base class.
Definition: CEGuiBaseApplication.h:69
~CEGuiD3D9BaseApplication()
Destructor.
Definition: CEGuiD3D9BaseApplication.h:45
bool initialiseDirect3D(unsigned int width, unsigned int height, unsigned int adapter, bool windowed)
Initialises Direct3D system.