Split platform-specific global data.

This commit is contained in:
Camilla Berglund
2012-04-22 15:53:02 +02:00
parent 2ac8da7465
commit 21e77fe1a6
8 changed files with 55 additions and 25 deletions
+13 -4
View File
@@ -43,8 +43,9 @@ typedef void* id;
#define _GLFW_PLATFORM_WINDOW_STATE _GLFWwindowNS NS
#define _GLFW_PLATFORM_LIBRARY_STATE _GLFWlibraryNS NS
#define _GLFW_PLATFORM_CONTEXT_STATE _GLFWcontextNSGL NSGL
#define _GLFW_PLATFORM_LIBRARY_WINDOW_STATE _GLFWlibraryNS NS
#define _GLFW_PLATFORM_LIBRARY_OPENGL_STATE _GLFWlibraryNSGL NSGL
//========================================================================
@@ -80,7 +81,7 @@ typedef struct _GLFWwindowNS
//------------------------------------------------------------------------
// Platform-specific library global data
// Platform-specific library global data for Cocoa
//------------------------------------------------------------------------
typedef struct _GLFWlibraryNS
{
@@ -89,8 +90,6 @@ typedef struct _GLFWlibraryNS
double resolution;
} timer;
// dlopen handle for dynamically loading OpenGL extension entry points
void* OpenGLFramework;
CGDisplayModeRef desktopMode;
CGEventSourceRef eventSource;
id delegate;
@@ -100,6 +99,16 @@ typedef struct _GLFWlibraryNS
} _GLFWlibraryNS;
//------------------------------------------------------------------------
// Platform-specific library global data for NSGL
//------------------------------------------------------------------------
typedef struct _GLFWlibraryNSGL
{
// dlopen handle for dynamically loading OpenGL extension entry points
void* framework;
} _GLFWlibraryNSGL;
//========================================================================
// Prototypes for platform specific internal functions
//========================================================================