Moved OpenGL-related functions into *opengl files.

This commit is contained in:
Camilla Berglund
2011-03-04 14:25:12 +01:00
parent 74a6c872d6
commit aae8999ecf
12 changed files with 128 additions and 128 deletions
+1 -1
View File
@@ -23,9 +23,9 @@ set(libglfw_SOURCES ${common_SOURCES}
win32_enable.c
win32_fullscreen.c
win32_gamma.c
win32_glext.c
win32_init.c
win32_joystick.c
win32_opengl.c
win32_time.c
win32_window.c
win32_dllmain.c)
@@ -35,6 +35,31 @@
////// GLFW platform API //////
//////////////////////////////////////////////////////////////////////////
//========================================================================
// Swap buffers (double-buffering)
//========================================================================
void _glfwPlatformSwapBuffers(void)
{
_GLFWwindow* window = _glfwLibrary.currentWindow;
_glfw_SwapBuffers(window->WGL.DC);
}
//========================================================================
// Set double buffering swap interval
//========================================================================
void _glfwPlatformSwapInterval(int interval)
{
_GLFWwindow* window = _glfwLibrary.currentWindow;
if (window->WGL.has_WGL_EXT_swap_control)
window->WGL.SwapIntervalEXT(interval);
}
//========================================================================
// Check if the current context supports the specified WGL extension
//========================================================================
-25
View File
@@ -1593,31 +1593,6 @@ void _glfwPlatformRestoreWindow(_GLFWwindow* window)
}
//========================================================================
// Swap buffers (double-buffering)
//========================================================================
void _glfwPlatformSwapBuffers(void)
{
_GLFWwindow* window = _glfwLibrary.currentWindow;
_glfw_SwapBuffers(window->WGL.DC);
}
//========================================================================
// Set double buffering swap interval
//========================================================================
void _glfwPlatformSwapInterval(int interval)
{
_GLFWwindow* window = _glfwLibrary.currentWindow;
if (window->WGL.has_WGL_EXT_swap_control)
window->WGL.SwapIntervalEXT(interval);
}
//========================================================================
// Write back window parameters into GLFW window structure
//========================================================================