Finished initial window/context backend split.

This commit is contained in:
Camilla Berglund
2012-11-27 15:02:26 +01:00
parent 4ce92262f7
commit 34d383399c
14 changed files with 191 additions and 113 deletions
+8 -28
View File
@@ -1,6 +1,6 @@
//========================================================================
// GLFW - An OpenGL library
// Platform: Cocoa/NSOpenGL
// Platform: Cocoa
// API Version: 3.0
// WWW: http://www.glfw.org/
//------------------------------------------------------------------------
@@ -27,13 +27,12 @@
//
//========================================================================
#ifndef _platform_h_
#define _platform_h_
#ifndef _cocoa_platform_h_
#define _cocoa_platform_h_
#include <stdint.h>
#if defined(__OBJC__)
#import <Cocoa/Cocoa.h>
#else
@@ -41,12 +40,13 @@
typedef void* id;
#endif
#if defined(_GLFW_NSGL)
#include "nsgl_platform.h"
#endif
#define _GLFW_PLATFORM_WINDOW_STATE _GLFWwindowNS NS
#define _GLFW_PLATFORM_LIBRARY_WINDOW_STATE _GLFWlibraryNS NS
#define _GLFW_PLATFORM_CONTEXT_STATE _GLFWcontextNSGL NSGL
#define _GLFW_PLATFORM_LIBRARY_OPENGL_STATE _GLFWlibraryNSGL NSGL
//========================================================================
// GLFW platform specific types
@@ -58,16 +58,6 @@ typedef void* id;
typedef intptr_t GLFWintptr;
//------------------------------------------------------------------------
// Platform-specific OpenGL context structure
//------------------------------------------------------------------------
typedef struct _GLFWcontextNSGL
{
id pixelFormat;
id context;
} _GLFWcontextNSGL;
//------------------------------------------------------------------------
// Platform-specific window structure
//------------------------------------------------------------------------
@@ -99,16 +89,6 @@ 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
//========================================================================
@@ -128,4 +108,4 @@ void _glfwRestoreVideoMode(void);
int _glfwInitOpenGL(void);
void _glfwTerminateOpenGL(void);
#endif // _platform_h_
#endif // _cocoa_platform_h_