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

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 Apr 13 2021 08:53:15