source: OGRE/trunk/ogrenew/RenderSystems/GL/include/OgreWin32Window.h @ 657

Revision 657, 2.8 KB checked in by mattausch, 19 years ago (diff)

added ogre dependencies and patched ogre sources

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-2005 The OGRE Team
8Also see acknowledgements in Readme.html
9
10This program is free software; you can redistribute it and/or modify it under
11the terms of the GNU Lesser General Public License as published by the Free Software
12Foundation; either version 2 of the License, or (at your option) any later
13version.
14
15This program is distributed in the hope that it will be useful, but WITHOUT
16ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
18
19You should have received a copy of the GNU Lesser General Public License along with
20this program; if not, write to the Free Software Foundation, Inc., 59 Temple
21Place - Suite 330, Boston, MA 02111-1307, USA, or go to
22http://www.gnu.org/copyleft/lesser.txt.
23-----------------------------------------------------------------------------
24*/
25
26#ifndef __Win32Window_H__
27#define __Win32Window_H__
28
29#include "OgreWin32Prerequisites.h"
30#include "OgreRenderWindow.h"
31
32namespace Ogre {
33    class Win32Window : public RenderWindow
34    {
35    public:
36        Win32Window(Win32GLSupport &glsupport);
37        ~Win32Window();
38
39       void create(const String& name, unsigned int width, unsigned int height,
40                    bool fullScreen, const NameValuePairList *miscParams);
41        void destroy(void);
42        bool isVisible() const;
43        bool isClosed(void) const;
44        void reposition(int left, int top);
45        void resize(unsigned int width, unsigned int height);
46        void swapBuffers(bool waitForVSync);
47
48        /** Overridden - see RenderTarget.
49        */
50        void writeContentsToFile(const String& filename);
51
52#ifdef GTP_VISIBILITY_MODIFIED_OGRE
53                uchar *getBufferContents(int &dimx, int &dimy);
54#endif // GTP_VISIBILITY_MODIFIED_OGRE
55
56                bool requiresTextureFlipping() const { return false; }
57
58                HWND getWindowHandle() const { return mHWnd; }
59                HDC getHDC() const { return mHDC; }
60               
61                // Method for dealing with resize / move & 3d library
62                virtual void windowMovedOrResized(void);
63               
64                void getCustomAttribute( const String& name, void* pData );
65
66        protected:
67                Win32GLSupport &mGLSupport;
68                HWND    mHWnd;                                  // Win32 Window handle
69                HDC             mHDC;
70                HGLRC   mGlrc;
71        bool    mIsExternal;
72        bool    mSizing;
73                bool    mClosed;
74        int     mDisplayFrequency;      // fullscreen only, to restore display
75        Win32Context *mContext;
76
77                static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
78    };
79}
80
81#endif
Note: See TracBrowser for help on using the repository browser.