mirror of
https://github.com/glfw/glfw.git
synced 2026-09-22 16:52:57 +00:00
Moved OpenGL-related functions into *opengl files.
This commit is contained in:
@@ -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
|
||||
//========================================================================
|
||||
@@ -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
|
||||
//========================================================================
|
||||
|
||||
Reference in New Issue
Block a user