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-2013 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
An off-screen rendering context.
Definition: OgreGLPBuffer.h:38
void start()
Start anything special.
static long _getDictionaryLong(CFDictionaryRef dict, const void *key)
String validateConfig(void)
Make sure all the extra options are valid.
static Boolean _getDictionaryBoolean(CFDictionaryRef dict, const void *key)
class OSXGLSupportImpl * mImpl
void * getProcAddress(const char *name)
Get the address of a function.
PixelComponentType
Pixel component format.
Implementation of GL as a rendering system.
RenderWindow * createWindow(bool autoCreateWindow, GLRenderSystem *renderSystem, const String &windowTitle)
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
Definition: OgreCommon.h:550
_StringBase String
unsigned int uint32
Definition: OgrePlatform.h:359
virtual GLPBuffer * createPBuffer(PixelComponentType format, uint32 width, uint32 height)
virtual RenderWindow * newWindow(const String &name, unsigned int width, unsigned int height, bool fullScreen, const NameValuePairList *miscParams=0)
Creates a new rendering window.
static CFComparisonResult _compareModes(const void *val1, const void *val2, void *context)
Manages the target rendering window.
void stop()
Stop anything special.
bool OSVersionIsAtLeast(String newVersion)
virtual bool supportsPBuffers()
void addConfig(void)
Add any special config values to the system.

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Tue Mar 18 2014 19:15:25