1 | #ifndef OGRE_OSXGLSupport_H |
---|
2 | #define OGRE_OSXGLSupport_H |
---|
3 | |
---|
4 | #include "OgreGLSupport.h" |
---|
5 | |
---|
6 | namespace Ogre |
---|
7 | { |
---|
8 | |
---|
9 | class OSXGLSupport : public GLSupport |
---|
10 | { |
---|
11 | public: |
---|
12 | OSXGLSupport(); |
---|
13 | ~OSXGLSupport(); |
---|
14 | |
---|
15 | /** |
---|
16 | * Add any special config values to the system. |
---|
17 | * Must have a "Full Screen" value that is a bool and a "Video Mode" value |
---|
18 | * that is a string in the form of wxh |
---|
19 | */ |
---|
20 | void addConfig( void ); |
---|
21 | |
---|
22 | /** |
---|
23 | * Make sure all the extra options are valid |
---|
24 | */ |
---|
25 | String validateConfig( void ); |
---|
26 | |
---|
27 | /// @copydoc GLSupport::createWindow |
---|
28 | RenderWindow* createWindow( bool autoCreateWindow, GLRenderSystem* renderSystem, const String& windowTitle ); |
---|
29 | |
---|
30 | /// @copydoc RenderSystem::createRenderWindow |
---|
31 | virtual RenderWindow* newWindow( const String &name, unsigned int width, unsigned int height, |
---|
32 | bool fullScreen, const NameValuePairList *miscParams = 0 ); |
---|
33 | |
---|
34 | /** |
---|
35 | * Start anything special |
---|
36 | */ |
---|
37 | void start(); |
---|
38 | |
---|
39 | /** |
---|
40 | * Stop anything special |
---|
41 | */ |
---|
42 | void stop(); |
---|
43 | |
---|
44 | /** |
---|
45 | * Get the address of a function |
---|
46 | */ |
---|
47 | void* getProcAddress( const char *name ); |
---|
48 | void* getProcAddress( const String& procname ); |
---|
49 | |
---|
50 | virtual bool supportsPBuffers(); |
---|
51 | virtual GLPBuffer* createPBuffer( PixelComponentType format, size_t width, size_t height ); |
---|
52 | |
---|
53 | // Core Foundation Array callback function for sorting, must be static for the function ptr |
---|
54 | static CFComparisonResult _compareModes (const void *val1, const void *val2, void *context); |
---|
55 | // Core Fondation Dictionary helper functions, also static for ease of use in above static |
---|
56 | static Boolean _getDictionaryBoolean(CFDictionaryRef dict, const void* key); |
---|
57 | static long _getDictionaryLong(CFDictionaryRef dict, const void* key); |
---|
58 | |
---|
59 | protected: |
---|
60 | String mAPI; |
---|
61 | String mContextType; |
---|
62 | |
---|
63 | }; // class OSXGLSupport |
---|
64 | |
---|
65 | }; // namespace Ogre |
---|
66 | |
---|
67 | #endif // OGRE_OSXGLSupport_H |
---|