mirror of
https://github.com/glfw/glfw.git
synced 2026-09-18 22:55:46 +00:00
Merge branch 'master' of github.com:elmindreda/glfw
This commit is contained in:
+7
-7
@@ -15,24 +15,24 @@ include_directories(${GLFW_SOURCE_DIR}/src
|
||||
${GLFW_BINARY_DIR}/src
|
||||
${GLFW_INCLUDE_DIR})
|
||||
|
||||
set(common_SOURCES enable.c error.c fullscreen.c gamma.c init.c input.c
|
||||
set(common_SOURCES error.c fullscreen.c gamma.c init.c input.c
|
||||
joystick.c opengl.c time.c window.c)
|
||||
|
||||
if(_GLFW_COCOA_NSGL)
|
||||
set(libglfw_SOURCES ${common_SOURCES} cocoa_enable.m cocoa_fullscreen.m
|
||||
cocoa_gamma.m cocoa_init.m cocoa_joystick.m
|
||||
set(libglfw_SOURCES ${common_SOURCES} cocoa_fullscreen.m cocoa_gamma.m
|
||||
cocoa_init.m cocoa_input.m cocoa_joystick.m
|
||||
cocoa_opengl.m cocoa_time.m cocoa_window.m)
|
||||
|
||||
# For some reason, CMake doesn't know about .m
|
||||
set_source_files_properties(${libglfw_SOURCES} PROPERTIES LANGUAGE C)
|
||||
elseif(_GLFW_WIN32_WGL)
|
||||
set(libglfw_SOURCES ${common_SOURCES} win32_enable.c win32_fullscreen.c
|
||||
win32_gamma.c win32_init.c win32_joystick.c
|
||||
set(libglfw_SOURCES ${common_SOURCES} win32_fullscreen.c win32_gamma.c
|
||||
win32_init.c win32_input.c win32_joystick.c
|
||||
win32_opengl.c win32_time.c win32_window.c
|
||||
win32_dllmain.c)
|
||||
elseif(_GLFW_X11_GLX)
|
||||
set(libglfw_SOURCES ${common_SOURCES} x11_enable.c x11_fullscreen.c
|
||||
x11_gamma.c x11_init.c x11_joystick.c
|
||||
set(libglfw_SOURCES ${common_SOURCES} x11_fullscreen.c x11_gamma.c
|
||||
x11_init.c x11_input.c x11_joystick.c
|
||||
x11_keysym2unicode.c x11_opengl.c x11_time.c
|
||||
x11_window.c)
|
||||
else()
|
||||
|
||||
+1
-1
@@ -393,7 +393,7 @@ static int convertMacKeyCode(unsigned int macKeyCode)
|
||||
|
||||
if ([event modifierFlags] & NSCommandKeyMask)
|
||||
{
|
||||
if (!window->sysKeysDisabled)
|
||||
if (window->systemKeys)
|
||||
[super keyDown:event];
|
||||
}
|
||||
else
|
||||
|
||||
-192
@@ -1,192 +0,0 @@
|
||||
//========================================================================
|
||||
// GLFW - An OpenGL library
|
||||
// Platform: Any
|
||||
// API version: 3.0
|
||||
// WWW: http://www.glfw.org/
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||
// Copyright (c) 2006-2010 Camilla Berglund <elmindreda@elmindreda.org>
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied
|
||||
// warranty. In no event will the authors be held liable for any damages
|
||||
// arising from the use of this software.
|
||||
//
|
||||
// Permission is granted to anyone to use this software for any purpose,
|
||||
// including commercial applications, and to alter it and redistribute it
|
||||
// freely, subject to the following restrictions:
|
||||
//
|
||||
// 1. The origin of this software must not be misrepresented; you must not
|
||||
// claim that you wrote the original software. If you use this software
|
||||
// in a product, an acknowledgment in the product documentation would
|
||||
// be appreciated but is not required.
|
||||
//
|
||||
// 2. Altered source versions must be plainly marked as such, and must not
|
||||
// be misrepresented as being the original software.
|
||||
//
|
||||
// 3. This notice may not be removed or altered from any source
|
||||
// distribution.
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Enable and disable sticky keys mode
|
||||
//========================================================================
|
||||
|
||||
static void enableStickyKeys(_GLFWwindow* window)
|
||||
{
|
||||
window->stickyKeys = GL_TRUE;
|
||||
}
|
||||
|
||||
static void disableStickyKeys(_GLFWwindow* window)
|
||||
{
|
||||
int i;
|
||||
|
||||
window->stickyKeys = GL_FALSE;
|
||||
|
||||
// Release all sticky keys
|
||||
for (i = 0; i <= GLFW_KEY_LAST; i++)
|
||||
{
|
||||
if (window->key[i] == GLFW_STICK)
|
||||
window->key[i] = GLFW_RELEASE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Enable and disable sticky mouse buttons mode
|
||||
//========================================================================
|
||||
|
||||
static void enableStickyMouseButtons(_GLFWwindow* window)
|
||||
{
|
||||
window->stickyMouseButtons = GL_TRUE;
|
||||
}
|
||||
|
||||
static void disableStickyMouseButtons(_GLFWwindow* window)
|
||||
{
|
||||
int i;
|
||||
|
||||
window->stickyMouseButtons = GL_FALSE;
|
||||
|
||||
// Release all sticky mouse buttons
|
||||
for (i = 0; i <= GLFW_MOUSE_BUTTON_LAST; i++)
|
||||
{
|
||||
if (window->mouseButton[i] == GLFW_STICK)
|
||||
window->mouseButton[i] = GLFW_RELEASE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Enable and disable system keys
|
||||
//========================================================================
|
||||
|
||||
static void enableSystemKeys(_GLFWwindow* window)
|
||||
{
|
||||
if (!window->sysKeysDisabled)
|
||||
return;
|
||||
|
||||
_glfwPlatformEnableSystemKeys(window);
|
||||
|
||||
// Indicate that system keys are no longer disabled
|
||||
window->sysKeysDisabled = GL_FALSE;
|
||||
}
|
||||
|
||||
static void disableSystemKeys(_GLFWwindow* window)
|
||||
{
|
||||
if (window->sysKeysDisabled)
|
||||
return;
|
||||
|
||||
_glfwPlatformDisableSystemKeys(window);
|
||||
|
||||
// Indicate that system keys are now disabled
|
||||
window->sysKeysDisabled = GL_TRUE;
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Enable and disable key repeat
|
||||
//========================================================================
|
||||
|
||||
static void enableKeyRepeat(_GLFWwindow* window)
|
||||
{
|
||||
window->keyRepeat = GL_TRUE;
|
||||
}
|
||||
|
||||
static void disableKeyRepeat(_GLFWwindow* window)
|
||||
{
|
||||
window->keyRepeat = GL_FALSE;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
////// GLFW public API //////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//========================================================================
|
||||
// Enable certain GLFW/window/system functions
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI void glfwEnable(GLFWwindow window, int token)
|
||||
{
|
||||
if (!_glfwInitialized)
|
||||
{
|
||||
_glfwSetError(GLFW_NOT_INITIALIZED, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (token)
|
||||
{
|
||||
case GLFW_STICKY_KEYS:
|
||||
enableStickyKeys(window);
|
||||
break;
|
||||
case GLFW_STICKY_MOUSE_BUTTONS:
|
||||
enableStickyMouseButtons(window);
|
||||
break;
|
||||
case GLFW_SYSTEM_KEYS:
|
||||
enableSystemKeys(window);
|
||||
break;
|
||||
case GLFW_KEY_REPEAT:
|
||||
enableKeyRepeat(window);
|
||||
break;
|
||||
default:
|
||||
_glfwSetError(GLFW_INVALID_ENUM, NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Disable certain GLFW/window/system functions
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI void glfwDisable(GLFWwindow window, int token)
|
||||
{
|
||||
if (!_glfwInitialized)
|
||||
{
|
||||
_glfwSetError(GLFW_NOT_INITIALIZED, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (token)
|
||||
{
|
||||
case GLFW_STICKY_KEYS:
|
||||
disableStickyKeys(window);
|
||||
break;
|
||||
case GLFW_STICKY_MOUSE_BUTTONS:
|
||||
disableStickyMouseButtons(window);
|
||||
break;
|
||||
case GLFW_SYSTEM_KEYS:
|
||||
disableSystemKeys(window);
|
||||
break;
|
||||
case GLFW_KEY_REPEAT:
|
||||
disableKeyRepeat(window);
|
||||
break;
|
||||
default:
|
||||
_glfwSetError(GLFW_INVALID_ENUM, NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-14
@@ -67,26 +67,13 @@ void _glfwFree(void* ptr)
|
||||
// Initialize various GLFW state
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI int glfwInit(void)
|
||||
{
|
||||
return glfwInitWithModels(NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Initialize various GLFW state using custom model interfaces
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI int glfwInitWithModels(GLFWthreadmodel* threading, GLFWallocator* allocator)
|
||||
GLFWAPI int glfwInit(GLFWallocator* allocator)
|
||||
{
|
||||
if (_glfwInitialized)
|
||||
return GL_TRUE;
|
||||
|
||||
memset(&_glfwLibrary, 0, sizeof(_glfwLibrary));
|
||||
|
||||
if (threading)
|
||||
_glfwLibrary.threading = *threading;
|
||||
|
||||
if (allocator)
|
||||
{
|
||||
// Verify that the specified model is complete
|
||||
|
||||
+190
-48
@@ -31,6 +31,122 @@
|
||||
#include "internal.h"
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Sets the cursor mode for the specified window
|
||||
//========================================================================
|
||||
|
||||
static void setCursorMode(_GLFWwindow* window, int mode)
|
||||
{
|
||||
int centerPosX, centerPosY;
|
||||
|
||||
if (mode != GLFW_CURSOR_NORMAL &&
|
||||
mode != GLFW_CURSOR_HIDDEN &&
|
||||
mode != GLFW_CURSOR_CAPTURED)
|
||||
{
|
||||
_glfwSetError(GLFW_INVALID_ENUM, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
if (window->cursorMode == mode)
|
||||
return;
|
||||
|
||||
centerPosX = window->width / 2;
|
||||
centerPosY = window->height / 2;
|
||||
|
||||
if (mode == GLFW_CURSOR_CAPTURED)
|
||||
_glfwPlatformSetMouseCursorPos(window, centerPosX, centerPosY);
|
||||
else if (window->cursorMode == GLFW_CURSOR_CAPTURED)
|
||||
{
|
||||
_glfwPlatformSetMouseCursorPos(window, centerPosX, centerPosY);
|
||||
_glfwInputCursorMotion(window,
|
||||
centerPosX - window->cursorPosX,
|
||||
centerPosY - window->cursorPosY);
|
||||
}
|
||||
|
||||
_glfwPlatformSetCursorMode(window, mode);
|
||||
|
||||
window->cursorMode = mode;
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Set sticky keys mode for the specified window
|
||||
//========================================================================
|
||||
|
||||
static void setStickyKeys(_GLFWwindow* window, int enabled)
|
||||
{
|
||||
if (window->stickyKeys == enabled)
|
||||
return;
|
||||
|
||||
if (!enabled)
|
||||
{
|
||||
int i;
|
||||
|
||||
// Release all sticky keys
|
||||
for (i = 0; i <= GLFW_KEY_LAST; i++)
|
||||
{
|
||||
if (window->key[i] == GLFW_STICK)
|
||||
window->key[i] = GLFW_RELEASE;
|
||||
}
|
||||
}
|
||||
|
||||
window->stickyKeys = enabled;
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Set sticky mouse buttons mode for the specified window
|
||||
//========================================================================
|
||||
|
||||
static void setStickyMouseButtons(_GLFWwindow* window, int enabled)
|
||||
{
|
||||
if (window->stickyMouseButtons == enabled)
|
||||
return;
|
||||
|
||||
if (!enabled)
|
||||
{
|
||||
int i;
|
||||
|
||||
// Release all sticky mouse buttons
|
||||
for (i = 0; i <= GLFW_MOUSE_BUTTON_LAST; i++)
|
||||
{
|
||||
if (window->mouseButton[i] == GLFW_STICK)
|
||||
window->mouseButton[i] = GLFW_RELEASE;
|
||||
}
|
||||
}
|
||||
|
||||
window->stickyMouseButtons = enabled;
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Set system keys for the specified window
|
||||
//========================================================================
|
||||
|
||||
static void setSystemKeys(_GLFWwindow* window, int enabled)
|
||||
{
|
||||
if (window->systemKeys == enabled)
|
||||
return;
|
||||
|
||||
if (enabled)
|
||||
_glfwPlatformEnableSystemKeys(window);
|
||||
else
|
||||
_glfwPlatformDisableSystemKeys(window);
|
||||
|
||||
window->systemKeys = enabled;
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Set key repeat for the specified window
|
||||
//========================================================================
|
||||
|
||||
static void setKeyRepeat(_GLFWwindow* window, int enabled)
|
||||
{
|
||||
window->keyRepeat = enabled;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
////// GLFW internal API //////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -41,7 +157,7 @@
|
||||
|
||||
void _glfwInputKey(_GLFWwindow* window, int key, int action)
|
||||
{
|
||||
GLboolean keyrepeat = GL_FALSE;
|
||||
GLboolean repeated = GL_FALSE;
|
||||
|
||||
if (key < 0 || key > GLFW_KEY_LAST)
|
||||
return;
|
||||
@@ -55,12 +171,12 @@ void _glfwInputKey(_GLFWwindow* window, int key, int action)
|
||||
window->key[key] = GLFW_STICK;
|
||||
else
|
||||
{
|
||||
keyrepeat = (window->key[key] == GLFW_PRESS) && (action == GLFW_PRESS);
|
||||
repeated = (window->key[key] == GLFW_PRESS) && (action == GLFW_PRESS);
|
||||
window->key[key] = (char) action;
|
||||
}
|
||||
|
||||
// Call user callback function
|
||||
if (_glfwLibrary.keyCallback && (window->keyRepeat || !keyrepeat))
|
||||
if (_glfwLibrary.keyCallback && (window->keyRepeat || !repeated))
|
||||
_glfwLibrary.keyCallback(window, key, action);
|
||||
}
|
||||
|
||||
@@ -150,6 +266,77 @@ void _glfwInputCursorMotion(_GLFWwindow* window, int x, int y)
|
||||
////// GLFW public API //////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//========================================================================
|
||||
// Returns the specified input mode of the specified window
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI int glfwGetInputMode(GLFWwindow handle, int mode)
|
||||
{
|
||||
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||
|
||||
if (!_glfwInitialized)
|
||||
{
|
||||
_glfwSetError(GLFW_NOT_INITIALIZED, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
case GLFW_CURSOR_MODE:
|
||||
return window->cursorMode;
|
||||
case GLFW_STICKY_KEYS:
|
||||
return window->stickyKeys;
|
||||
case GLFW_STICKY_MOUSE_BUTTONS:
|
||||
return window->stickyMouseButtons;
|
||||
case GLFW_SYSTEM_KEYS:
|
||||
return window->systemKeys;
|
||||
case GLFW_KEY_REPEAT:
|
||||
return window->keyRepeat;
|
||||
default:
|
||||
_glfwSetError(GLFW_INVALID_ENUM, NULL);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Sets the specified input mode of the specified window
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI void glfwSetInputMode(GLFWwindow handle, int mode, int value)
|
||||
{
|
||||
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||
|
||||
if (!_glfwInitialized)
|
||||
{
|
||||
_glfwSetError(GLFW_NOT_INITIALIZED, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
case GLFW_CURSOR_MODE:
|
||||
setCursorMode(window, value);
|
||||
break;
|
||||
case GLFW_STICKY_KEYS:
|
||||
setStickyKeys(window, value ? GL_TRUE : GL_FALSE);
|
||||
break;
|
||||
case GLFW_STICKY_MOUSE_BUTTONS:
|
||||
setStickyMouseButtons(window, value ? GL_TRUE : GL_FALSE);
|
||||
break;
|
||||
case GLFW_SYSTEM_KEYS:
|
||||
setSystemKeys(window, value ? GL_TRUE : GL_FALSE);
|
||||
break;
|
||||
case GLFW_KEY_REPEAT:
|
||||
setKeyRepeat(window, value ? GL_TRUE : GL_FALSE);
|
||||
break;
|
||||
default:
|
||||
_glfwSetError(GLFW_INVALID_ENUM, NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Returns the state of the specified key for the specified window
|
||||
//========================================================================
|
||||
@@ -300,51 +487,6 @@ GLFWAPI void glfwGetScrollOffset(GLFWwindow handle, int* xoffset, int* yoffset)
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Sets the cursor mode for the specified window
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI void glfwSetCursorMode(GLFWwindow handle, int mode)
|
||||
{
|
||||
int centerPosX, centerPosY;
|
||||
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||
|
||||
if (!_glfwInitialized)
|
||||
{
|
||||
_glfwSetError(GLFW_NOT_INITIALIZED, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
if (mode != GLFW_CURSOR_NORMAL &&
|
||||
mode != GLFW_CURSOR_HIDDEN &&
|
||||
mode != GLFW_CURSOR_CAPTURED)
|
||||
{
|
||||
_glfwSetError(GLFW_INVALID_ENUM, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
if (window->cursorMode == mode)
|
||||
return;
|
||||
|
||||
centerPosX = window->width / 2;
|
||||
centerPosY = window->height / 2;
|
||||
|
||||
if (mode == GLFW_CURSOR_CAPTURED)
|
||||
_glfwPlatformSetMouseCursorPos(window, centerPosX, centerPosY);
|
||||
else if (window->cursorMode == GLFW_CURSOR_CAPTURED)
|
||||
{
|
||||
_glfwPlatformSetMouseCursorPos(window, centerPosX, centerPosY);
|
||||
_glfwInputCursorMotion(window,
|
||||
centerPosX - window->cursorPosX,
|
||||
centerPosY - window->cursorPosY);
|
||||
}
|
||||
|
||||
_glfwPlatformSetCursorMode(window, mode);
|
||||
|
||||
window->cursorMode = mode;
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Set callback function for keyboard input
|
||||
//========================================================================
|
||||
|
||||
+4
-5
@@ -183,7 +183,7 @@ struct _GLFWwindow
|
||||
GLboolean stickyKeys;
|
||||
GLboolean stickyMouseButtons;
|
||||
GLboolean keyRepeat;
|
||||
GLboolean sysKeysDisabled; // system keys disabled flag
|
||||
GLboolean systemKeys; // system keys enabled flag
|
||||
int cursorPosX, cursorPosY;
|
||||
int cursorMode;
|
||||
int scrollX, scrollY;
|
||||
@@ -241,7 +241,6 @@ struct _GLFWlibrary
|
||||
GLFWkeyfun keyCallback;
|
||||
GLFWcharfun charCallback;
|
||||
|
||||
GLFWthreadmodel threading;
|
||||
GLFWallocator allocator;
|
||||
|
||||
GLFWgammaramp currentRamp;
|
||||
@@ -276,7 +275,7 @@ int _glfwPlatformInit(void);
|
||||
int _glfwPlatformTerminate(void);
|
||||
const char* _glfwPlatformGetVersionString(void);
|
||||
|
||||
// Enable/Disable
|
||||
// Input
|
||||
void _glfwPlatformEnableSystemKeys(_GLFWwindow* window);
|
||||
void _glfwPlatformDisableSystemKeys(_GLFWwindow* window);
|
||||
|
||||
@@ -339,14 +338,14 @@ void _glfwSetError(int error, const char* description);
|
||||
// Window management (window.c)
|
||||
void _glfwSetDefaultWindowHints(void);
|
||||
|
||||
// WIndow event notification
|
||||
// Window event notification (window.c)
|
||||
void _glfwInputWindowFocus(_GLFWwindow* window, GLboolean activated);
|
||||
void _glfwInputWindowPos(_GLFWwindow* window, int x, int y);
|
||||
void _glfwInputWindowSize(_GLFWwindow* window, int width, int height);
|
||||
void _glfwInputWindowIconify(_GLFWwindow* window, int iconified);
|
||||
void _glfwInputWindowDamage(_GLFWwindow* window);
|
||||
|
||||
// Input event notification
|
||||
// Input event notification (input.c)
|
||||
void _glfwInputKey(_GLFWwindow* window, int key, int action);
|
||||
void _glfwInputChar(_GLFWwindow* window, int character);
|
||||
void _glfwInputScroll(_GLFWwindow* window, int x, int y);
|
||||
|
||||
+2
-1
@@ -309,6 +309,7 @@ GLFWAPI GLFWwindow glfwOpenWindow(int width, int height,
|
||||
window->height = height;
|
||||
window->mode = mode;
|
||||
window->cursorMode = GLFW_CURSOR_NORMAL;
|
||||
window->systemKeys = GL_TRUE;
|
||||
|
||||
// Open the actual window and create its context
|
||||
if (!_glfwPlatformOpenWindow(window, &wndconfig, &fbconfig))
|
||||
@@ -330,7 +331,7 @@ GLFWAPI GLFWwindow glfwOpenWindow(int width, int height,
|
||||
// The GLFW specification states that fullscreen windows have the cursor
|
||||
// captured by default
|
||||
if (mode == GLFW_FULLSCREEN)
|
||||
glfwSetCursorMode(window, GLFW_CURSOR_CAPTURED);
|
||||
glfwSetInputMode(window, GLFW_CURSOR_MODE, GLFW_CURSOR_CAPTURED);
|
||||
|
||||
// Clearing the front buffer to black to avoid garbage pixels left over
|
||||
// from previous uses of our bit of VRAM
|
||||
|
||||
+1
-2
@@ -31,8 +31,7 @@
|
||||
#include "internal.h"
|
||||
|
||||
|
||||
void (*glXGetProcAddress(const GLubyte* procName))();
|
||||
void (*glXGetProcAddressARB(const GLubyte* procName))();
|
||||
// This is the only glXGetProcAddress variant not declared by glxext.h
|
||||
void (*glXGetProcAddressEXT(const GLubyte* procName))();
|
||||
|
||||
|
||||
|
||||
@@ -46,13 +46,6 @@
|
||||
// extensions and not all operating systems come with an up-to-date version
|
||||
#include "../support/GL/glxext.h"
|
||||
|
||||
|
||||
// We need declarations for GLX version 1.3 or above even if the server doesn't
|
||||
// support version 1.3
|
||||
#ifndef GLX_VERSION_1_3
|
||||
#error "GLX header version 1.3 or above is required"
|
||||
#endif
|
||||
|
||||
// With XFree86, we can use the XF86VidMode extension
|
||||
#if defined(_GLFW_HAS_XF86VIDMODE)
|
||||
#include <X11/extensions/xf86vmode.h>
|
||||
|
||||
Reference in New Issue
Block a user