From c1ab73b97970a237222d5c6af684a8e10775e1e5 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Wed, 27 Jul 2011 16:01:27 +0200 Subject: [PATCH] Renamed context-related functions to more closely match underlying APIs. --- include/GL/glfw3.h | 6 +++--- readme.html | 6 +++--- src/cocoa_opengl.m | 15 ++++++++++++++- src/cocoa_window.m | 14 +------------- src/internal.h | 4 ++-- src/opengl.c | 42 ++++++++++++++++++++++++++++++++++++++++-- src/win32_opengl.c | 15 ++++++++++++++- src/win32_window.c | 17 ++--------------- src/window.c | 42 ++---------------------------------------- src/x11_opengl.c | 19 ++++++++++++++++++- src/x11_window.c | 17 ----------------- tests/sharing.c | 6 +++--- tests/windows.c | 2 +- 13 files changed, 103 insertions(+), 102 deletions(-) diff --git a/include/GL/glfw3.h b/include/GL/glfw3.h index cba9e9b7..1836d134 100644 --- a/include/GL/glfw3.h +++ b/include/GL/glfw3.h @@ -537,9 +537,7 @@ GLFWAPI void glfwSetGammaRamp(const GLFWgammaramp* ramp); /* Window handling */ GLFWAPI GLFWwindow glfwOpenWindow(int width, int height, int mode, const char* title, GLFWwindow share); GLFWAPI void glfwOpenWindowHint(int target, int hint); -GLFWAPI void glfwMakeWindowCurrent(GLFWwindow window); GLFWAPI int glfwIsWindow(GLFWwindow window); -GLFWAPI GLFWwindow glfwGetCurrentWindow(void); GLFWAPI void glfwCloseWindow(GLFWwindow window); GLFWAPI void glfwSetWindowTitle(GLFWwindow, const char* title); GLFWAPI void glfwGetWindowSize(GLFWwindow, int* width, int* height); @@ -583,11 +581,13 @@ GLFWAPI double glfwGetTime(void); GLFWAPI void glfwSetTime(double time); /* OpenGL support */ +GLFWAPI void glfwMakeContextCurrent(GLFWwindow window); +GLFWAPI GLFWwindow glfwGetCurrentContext(void); GLFWAPI void glfwSwapBuffers(void); GLFWAPI void glfwSwapInterval(int interval); GLFWAPI int glfwExtensionSupported(const char* extension); GLFWAPI void* glfwGetProcAddress(const char* procname); -GLFWAPI void glfwCopyGLState(GLFWwindow src, GLFWwindow dst, unsigned long mask); +GLFWAPI void glfwCopyContext(GLFWwindow src, GLFWwindow dst, unsigned long mask); /* Enable/disable functions */ GLFWAPI void glfwEnable(GLFWwindow window, int token); diff --git a/readme.html b/readme.html index d1d4b031..481444d0 100644 --- a/readme.html +++ b/readme.html @@ -263,7 +263,7 @@ version of GLFW.