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-2005 The OGRE Team
|
---|
8 | Also see acknowledgements in Readme.html
|
---|
9 |
|
---|
10 | This program is free software; you can redistribute it and/or modify it under
|
---|
11 | the terms of the GNU Lesser General Public License as published by the Free Software
|
---|
12 | Foundation; either version 2 of the License, or (at your option) any later
|
---|
13 | version.
|
---|
14 |
|
---|
15 | This program is distributed in the hope that it will be useful, but WITHOUT
|
---|
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
---|
17 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
---|
18 |
|
---|
19 | You should have received a copy of the GNU Lesser General Public License along with
|
---|
20 | this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
---|
21 | Place - Suite 330, Boston, MA 02111-1307, USA, or go to
|
---|
22 | http://www.gnu.org/copyleft/lesser.txt.
|
---|
23 | -----------------------------------------------------------------------------
|
---|
24 | */
|
---|
25 |
|
---|
26 | #ifndef __SDLWindow_H__
|
---|
27 | #define __SDLWindow_H__
|
---|
28 |
|
---|
29 | #include "OgreSDLPrerequisites.h"
|
---|
30 | #include "OgreRenderWindow.h"
|
---|
31 |
|
---|
32 | namespace Ogre {
|
---|
33 | class SDLWindow : public RenderWindow
|
---|
34 | {
|
---|
35 | private:
|
---|
36 | SDL_Surface* mScreen;
|
---|
37 | bool mActive;
|
---|
38 | bool mClosed;
|
---|
39 |
|
---|
40 | // Process pending events
|
---|
41 | void processEvents(void);
|
---|
42 | public:
|
---|
43 | SDLWindow();
|
---|
44 | ~SDLWindow();
|
---|
45 |
|
---|
46 | void create(const String& name, unsigned int width, unsigned int height,
|
---|
47 | bool fullScreen, const NameValuePairList *miscParams);
|
---|
48 | /** Overridden - see RenderWindow */
|
---|
49 | void destroy(void);
|
---|
50 | /** Overridden - see RenderWindow */
|
---|
51 | bool isActive(void) const;
|
---|
52 | /** Overridden - see RenderWindow */
|
---|
53 | bool isClosed(void) const;
|
---|
54 | /** Overridden - see RenderWindow */
|
---|
55 | void reposition(int left, int top);
|
---|
56 | /** Overridden - see RenderWindow */
|
---|
57 | void resize(unsigned int width, unsigned int height);
|
---|
58 | /** Overridden - see RenderWindow */
|
---|
59 | void swapBuffers(bool waitForVSync);
|
---|
60 |
|
---|
61 | /** Overridden - see RenderTarget.
|
---|
62 | */
|
---|
63 | void writeContentsToFile(const String& filename);
|
---|
64 |
|
---|
65 | #ifdef GTP_VISIBILITY_MODIFIED_OGRE
|
---|
66 | uchar *getBufferContents(int &dimx, int &dimy) {dimx = dimy = 0; return NULL; };
|
---|
67 | #endif // GTP_VISIBILITY_MODIFIED_OGRE
|
---|
68 |
|
---|
69 | bool requiresTextureFlipping() const { return false; }
|
---|
70 | };
|
---|
71 | }
|
---|
72 |
|
---|
73 | #endif
|
---|
74 |
|
---|