Merge branch 'master' into multi-monitor

Conflicts:
	CMakeLists.txt
	readme.html
	src/CMakeLists.txt
	src/cocoa_platform.h
	src/win32_platform.h
	src/x11_platform.h
	tests/events.c
This commit is contained in:
Camilla Berglund
2012-12-02 20:52:03 +01:00
32 changed files with 1911 additions and 261 deletions
+11 -29
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,15 @@
typedef void* id;
#endif
#if defined(_GLFW_NSGL)
#include "nsgl_platform.h"
#else
#error "No supported context creation API selected"
#endif
#define _GLFW_PLATFORM_MONITOR_STATE _GLFWmonitorNS NS
#define _GLFW_PLATFORM_WINDOW_STATE _GLFWwindowNS NS
#define _GLFW_PLATFORM_CONTEXT_STATE _GLFWcontextNSGL NSGL
#define _GLFW_PLATFORM_WINDOW_STATE _GLFWwindowNS NS
#define _GLFW_PLATFORM_LIBRARY_WINDOW_STATE _GLFWlibraryNS NS
#define _GLFW_PLATFORM_LIBRARY_OPENGL_STATE _GLFWlibraryNSGL NSGL
#define _GLFW_PLATFORM_MONITOR_STATE _GLFWmonitorNS NS
//========================================================================
@@ -59,16 +61,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
//------------------------------------------------------------------------
@@ -110,16 +102,6 @@ typedef struct _GLFWmonitorNS
} _GLFWmonitorNS;
//------------------------------------------------------------------------
// 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
//========================================================================
@@ -139,4 +121,4 @@ void _glfwRestoreVideoMode(void);
int _glfwInitOpenGL(void);
void _glfwTerminateOpenGL(void);
#endif // _platform_h_
#endif // _cocoa_platform_h_