OGRE  2.0
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgreOSXGLSupport.h
Go to the documentation of this file.
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-2014 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 */
28 
29 #ifndef OGRE_OSXGLSupport_H
30 #define OGRE_OSXGLSupport_H
31 
32 #include "OgreGLSupport.h"
33 
34 namespace Ogre
35 {
36 
37 class OSXGLSupport : public GLSupport
38 {
39 public:
40  OSXGLSupport();
41  ~OSXGLSupport();
42 
48  void addConfig( void );
49 
53  String validateConfig( void );
54 
56  RenderWindow* createWindow( bool autoCreateWindow, GLRenderSystem* renderSystem, const String& windowTitle );
57 
59  virtual RenderWindow* newWindow( const String &name, unsigned int width, unsigned int height,
60  bool fullScreen, const NameValuePairList *miscParams = 0 );
61 
65  void start();
66 
70  void stop();
71 
75  void* getProcAddress( const char *name );
76  void* getProcAddress( const String& procname );
77 
78  virtual bool supportsPBuffers();
79  virtual GLPBuffer* createPBuffer( PixelComponentType format, uint32 width, uint32 height );
80 
81  // Core Foundation Array callback function for sorting, must be static for the function ptr
82  static CFComparisonResult _compareModes (const void *val1, const void *val2, void *context);
83  // Core Fondation Dictionary helper functions, also static for ease of use in above static
84  static Boolean _getDictionaryBoolean(CFDictionaryRef dict, const void* key);
85  static long _getDictionaryLong(CFDictionaryRef dict, const void* key);
86  bool OSVersionIsAtLeast(String newVersion);
87 
88 protected:
91 
92  //Implement this in .mm and put all obj.c objects there
93  class OSXGLSupportImpl * mImpl;
94 
95 }; // class OSXGLSupport
96 
97 } // namespace Ogre
98 
99 #endif // OGRE_OSXGLSupport_H
Manages the target rendering window.
unsigned int uint32
Definition: OgrePlatform.h:420
static long _getDictionaryLong(CFDictionaryRef dict, const void *key)
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
Definition: OgreCommon.h:580
virtual bool supportsPBuffers()
PixelComponentType
Pixel component format.
bool OSVersionIsAtLeast(String newVersion)
void stop()
Stop anything special.
RenderWindow * createWindow(bool autoCreateWindow, GLRenderSystem *renderSystem, const String &windowTitle)
An off-screen rendering context.
Definition: OgreGLPBuffer.h:38
void * getProcAddress(const char *name)
Get the address of a function.
String validateConfig(void)
Make sure all the extra options are valid.
virtual GLPBuffer * createPBuffer(PixelComponentType format, uint32 width, uint32 height)
static CFComparisonResult _compareModes(const void *val1, const void *val2, void *context)
_StringBase String
Definition: OgreCommon.h:53
void addConfig(void)
Add any special config values to the system.
void start()
Start anything special.
class OSXGLSupportImpl * mImpl
static Boolean _getDictionaryBoolean(CFDictionaryRef dict, const void *key)
virtual RenderWindow * newWindow(const String &name, unsigned int width, unsigned int height, bool fullScreen, const NameValuePairList *miscParams=0)
Creates a new rendering window.
Implementation of GL as a rendering system.