Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/RenderSystems/GL/include/OSX/OgreOSXCocoaWindow.h @ 3

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

=update

File size: 2.6 KB
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 __OSXCocoaWindow_H__
27#define __OSXCocoaWindow_H__
28
29#include "OgreOSXWindow.h"
30#include "OgreOSXCocoaContext.h"
31
32#include <Cocoa/Cocoa.h>
33#include "OgreOSXCocoaView.h"
34
35namespace Ogre {
36    class OSXCocoaWindow : public OSXWindow
37    {
38    private:
39                NSWindow *mWindow;
40                OgreView *mView;
41                NSOpenGLContext *glContext;
42               
43        bool mActive;
44        bool mClosed;
45                bool mHasResized;
46           
47        // Process pending events
48        void processEvents(void);
49    public:
50        OSXCocoaWindow();
51        ~OSXCocoaWindow();
52               
53                OgreView* ogreView() const { return mView; };
54                NSOpenGLContext* nsopenGLContext() const { return glContext; };
55                void createWithView(OgreView *view);
56
57                void create(const String& name, unsigned int width, unsigned int height,
58                    bool fullScreen, const NameValuePairList *miscParams);
59        /** Overridden - see RenderWindow */
60        void destroy(void);
61        /** Overridden - see RenderWindow */
62        bool isActive(void) const;
63        /** Overridden - see RenderWindow */
64        bool isClosed(void) const;
65        /** Overridden - see RenderWindow */
66        void reposition(int left, int top);
67        /** Overridden - see RenderWindow */
68        void resize(unsigned int width, unsigned int height);
69        /** Overridden - see RenderWindow */
70        void swapBuffers(bool waitForVSync);
71        /** Overridden - see RenderWindow */
72                void windowMovedOrResized();
73
74                bool requiresTextureFlipping() const { return false; }         
75                void getCustomAttribute( const String& name, void* pData );
76    };
77}
78
79#endif
80
Note: See TracBrowser for help on using the repository browser.