Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | Related Pages

renderwindow.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                       renderwindow.h  -  Render window data
00003                              -------------------
00004     begin                : Thu Mar 27 2003
00005     copyright            : (C) 2003 by Reality Rift Studios
00006     email                : mattias@realityrift.com
00007  ***************************************************************************
00008 
00009  The contents of this file are subject to the Mozilla Public License Version
00010  1.1 (the "License"); you may not use this file except in compliance with
00011  the License. You may obtain a copy of the License at 
00012  http://www.mozilla.org/MPL/
00013 
00014  Software distributed under the License is distributed on an "AS IS" basis,
00015  WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00016  for the specific language governing rights and limitations under the
00017  License.
00018 
00019  The Original Code is the NeoEngine, renderwindow.h
00020 
00021  The Initial Developer of the Original Code is Mattias Jansson.
00022  Portions created by Mattias Jansson are Copyright (C) 2003
00023  Reality Rift Studios. All Rights Reserved.
00024 
00025  ***************************************************************************/
00026 
00027 #ifndef __NERENDERWINDOW_H
00028 #define __NERENDERWINDOW_H
00029 
00030 
00031 #include "base.h"
00032 #include "renderresolution.h"
00033 #include "rendercaps.h"
00034 
00035 
00042 namespace NeoEngine
00043 {
00044 
00045 
00050 class NEOENGINE_API RenderWindow
00051 {
00052     public:
00053 
00057         enum RENDERWINDOWFLAG
00058         {
00060           DEVICECREATED                               = 0x00000001,
00061 
00063           USEDIMENSIONS                               = 0x00000004
00064         };
00065 
00066 
00068         unsigned int                                  m_uiFlags;
00069 
00070 #ifdef WIN32
00071 
00073         void                                         *m_hWnd;
00074 
00076         void                                         *m_hInstance;
00077 
00079         unsigned int                                  m_uiAdapter;
00080 
00082         void                                         *m_apData[5];
00083 
00084 #elif defined(__APPLE__)
00085 
00087         void                                         *m_pWindow;
00088 
00090         void                                         *m_apData[7];
00091 
00092 #elif defined(POSIX)
00093 
00095         void                                         *m_Window;
00096 
00098         void                                         *m_pDisplay;
00099 
00101         void                                         *m_apData[6];
00102 
00103 #else
00104 
00106         void                                         *m_apData[8];
00107 
00108 #endif
00109 
00111         std::string                                   m_strWindowName;
00112 
00114         RenderCaps                                    m_kCaps;
00115 
00117         RenderResolution                              m_kDesktopResolution;
00118 
00120         RenderResolution                              m_kResolution;
00121 
00122 
00126                                                       RenderWindow() { Reset(); }
00127 
00134                                                       RenderWindow( const std::string &rstrWindowName, const RenderCaps &rkCaps, const RenderResolution &rkResolution ) : m_strWindowName( rstrWindowName ), m_kCaps( rkCaps ), m_kResolution( rkResolution ) { ResetPlatformData(); }
00135 
00139         void                                          ResetPlatformData()
00140         {
00141 #if defined( WIN32 )
00142             m_hWnd      = 0;
00143             m_hInstance = 0;
00144             m_uiAdapter = 0;
00145 #elif defined( __APPLE__ )
00146             m_pWindow   = 0;
00147 #elif defined( POSIX )
00148             m_Window    = 0;
00149             m_pDisplay  = 0;
00150 #endif
00151         }
00152 
00156         void                                          Reset() { ResetPlatformData(); m_strWindowName = ""; m_kCaps.ResetAll(); memset( &m_kDesktopResolution, 0, sizeof( RenderResolution ) ); memset( &m_kResolution, 0, sizeof( RenderResolution ) ); }
00157 };
00158 
00159 
00160 };
00161 
00162 
00163 #endif
00164 

Generated on Wed Jan 21 14:21:07 2004 for NeoEngine by doxygen 1.3.5