mirror of
https://github.com/glfw/glfw.git
synced 2026-01-11 23:33:16 +01:00
Replaced scattered partial wglext.h with actual file.
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
#include <windows.h>
|
||||
#include <mmsystem.h>
|
||||
|
||||
#include "../../include/GL/wglext.h"
|
||||
#include "../../include/GL/glfw3.h"
|
||||
|
||||
|
||||
@@ -134,78 +135,6 @@ typedef struct tagKBDLLHOOKSTRUCT {
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef WGL_EXT_swap_control
|
||||
|
||||
typedef int (APIENTRY * WGLSWAPINTERVALEXT_T) (int);
|
||||
|
||||
#endif /*WGL_EXT_swap_control*/
|
||||
|
||||
|
||||
#ifndef WGL_ARB_pixel_format
|
||||
|
||||
typedef BOOL (WINAPI * WGLGETPIXELFORMATATTRIBIVARB_T) (HDC, int, int, UINT, const int* , int* );
|
||||
typedef const char* (APIENTRY * WGLGETEXTENSIONSSTRINGEXT_T)(void);
|
||||
typedef const char* (APIENTRY * WGLGETEXTENSIONSSTRINGARB_T)(HDC);
|
||||
|
||||
/* Constants for wglGetPixelFormatAttribivARB */
|
||||
#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
|
||||
#define WGL_DRAW_TO_WINDOW_ARB 0x2001
|
||||
#define WGL_SUPPORT_OPENGL_ARB 0x2010
|
||||
#define WGL_ACCELERATION_ARB 0x2003
|
||||
#define WGL_DOUBLE_BUFFER_ARB 0x2011
|
||||
#define WGL_STEREO_ARB 0x2012
|
||||
#define WGL_PIXEL_TYPE_ARB 0x2013
|
||||
#define WGL_COLOR_BITS_ARB 0x2014
|
||||
#define WGL_RED_BITS_ARB 0x2015
|
||||
#define WGL_GREEN_BITS_ARB 0x2017
|
||||
#define WGL_BLUE_BITS_ARB 0x2019
|
||||
#define WGL_ALPHA_BITS_ARB 0x201B
|
||||
#define WGL_ACCUM_BITS_ARB 0x201D
|
||||
#define WGL_ACCUM_RED_BITS_ARB 0x201E
|
||||
#define WGL_ACCUM_GREEN_BITS_ARB 0x201F
|
||||
#define WGL_ACCUM_BLUE_BITS_ARB 0x2020
|
||||
#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
|
||||
#define WGL_DEPTH_BITS_ARB 0x2022
|
||||
#define WGL_STENCIL_BITS_ARB 0x2023
|
||||
#define WGL_AUX_BUFFERS_ARB 0x2024
|
||||
#define WGL_SAMPLE_BUFFERS_ARB 0x2041
|
||||
#define WGL_SAMPLES_ARB 0x2042
|
||||
|
||||
/* Constants for WGL_ACCELERATION_ARB */
|
||||
#define WGL_NO_ACCELERATION_ARB 0x2025
|
||||
#define WGL_GENERIC_ACCELERATION_ARB 0x2026
|
||||
#define WGL_FULL_ACCELERATION_ARB 0x2027
|
||||
|
||||
/* Constants for WGL_PIXEL_TYPE_ARB */
|
||||
#define WGL_TYPE_RGBA_ARB 0x202B
|
||||
#define WGL_TYPE_COLORINDEX_ARB 0x202C
|
||||
|
||||
#endif /*WGL_ARB_pixel_format*/
|
||||
|
||||
|
||||
#ifndef WGL_ARB_create_context
|
||||
|
||||
/* wglCreateContextAttribsARB */
|
||||
typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC, HGLRC, const int* );
|
||||
|
||||
/* Tokens for wglCreateContextAttribsARB attributes */
|
||||
#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
|
||||
#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
|
||||
#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093
|
||||
#define WGL_CONTEXT_FLAGS_ARB 0x2094
|
||||
#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
|
||||
|
||||
/* Bits for WGL_CONTEXT_FLAGS_ARB */
|
||||
#define WGL_CONTEXT_DEBUG_BIT_ARB 0x0001
|
||||
#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002
|
||||
|
||||
/* Bits for WGL_CONTEXT_PROFILE_MASK_ARB */
|
||||
#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
|
||||
#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
|
||||
|
||||
#endif /*WGL_ARB_create_context*/
|
||||
|
||||
|
||||
#ifndef GL_VERSION_3_0
|
||||
|
||||
typedef const GLubyte* (APIENTRY *PFNGLGETSTRINGIPROC) (GLenum, GLuint);
|
||||
@@ -294,15 +223,15 @@ typedef struct _GLFWcontextWGL
|
||||
HGLRC context; // Permanent rendering context
|
||||
|
||||
// Platform specific extensions (context specific)
|
||||
WGLSWAPINTERVALEXT_T SwapIntervalEXT;
|
||||
WGLGETPIXELFORMATATTRIBIVARB_T GetPixelFormatAttribivARB;
|
||||
WGLGETEXTENSIONSSTRINGEXT_T GetExtensionsStringEXT;
|
||||
WGLGETEXTENSIONSSTRINGARB_T GetExtensionsStringARB;
|
||||
PFNWGLCREATECONTEXTATTRIBSARBPROC CreateContextAttribsARB;
|
||||
GLboolean has_WGL_EXT_swap_control;
|
||||
GLboolean has_WGL_ARB_multisample;
|
||||
GLboolean has_WGL_ARB_pixel_format;
|
||||
GLboolean has_WGL_ARB_create_context;
|
||||
PFNWGLSWAPINTERVALEXTPROC SwapIntervalEXT;
|
||||
PFNWGLGETPIXELFORMATATTRIBIVARBPROC GetPixelFormatAttribivARB;
|
||||
PFNWGLGETEXTENSIONSSTRINGEXTPROC GetExtensionsStringEXT;
|
||||
PFNWGLGETEXTENSIONSSTRINGARBPROC GetExtensionsStringARB;
|
||||
PFNWGLCREATECONTEXTATTRIBSARBPROC CreateContextAttribsARB;
|
||||
GLboolean has_WGL_EXT_swap_control;
|
||||
GLboolean has_WGL_ARB_multisample;
|
||||
GLboolean has_WGL_ARB_pixel_format;
|
||||
GLboolean has_WGL_ARB_create_context;
|
||||
} _GLFWcontextWGL;
|
||||
|
||||
|
||||
|
||||
@@ -994,11 +994,11 @@ static void initWGLExtensions(_GLFWwindow* window)
|
||||
window->WGL.has_WGL_ARB_multisample = GL_FALSE;
|
||||
window->WGL.has_WGL_ARB_create_context = GL_FALSE;
|
||||
|
||||
window->WGL.GetExtensionsStringEXT = (WGLGETEXTENSIONSSTRINGEXT_T)
|
||||
window->WGL.GetExtensionsStringEXT = (PFNWGLGETEXTENSIONSSTRINGEXTPROC)
|
||||
wglGetProcAddress("wglGetExtensionsStringEXT");
|
||||
if (!window->WGL.GetExtensionsStringEXT)
|
||||
{
|
||||
window->WGL.GetExtensionsStringARB = (WGLGETEXTENSIONSSTRINGARB_T)
|
||||
window->WGL.GetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)
|
||||
wglGetProcAddress("wglGetExtensionsStringARB");
|
||||
if (!window->WGL.GetExtensionsStringARB)
|
||||
return;
|
||||
@@ -1018,7 +1018,7 @@ static void initWGLExtensions(_GLFWwindow* window)
|
||||
|
||||
if (_glfwPlatformExtensionSupported("WGL_EXT_swap_control"))
|
||||
{
|
||||
window->WGL.SwapIntervalEXT = (WGLSWAPINTERVALEXT_T)
|
||||
window->WGL.SwapIntervalEXT = (PFNWGLSWAPINTERVALEXT)
|
||||
wglGetProcAddress("wglSwapIntervalEXT");
|
||||
|
||||
if (window->WGL.SwapIntervalEXT)
|
||||
@@ -1027,7 +1027,7 @@ static void initWGLExtensions(_GLFWwindow* window)
|
||||
|
||||
if (_glfwPlatformExtensionSupported("WGL_ARB_pixel_format"))
|
||||
{
|
||||
window->WGL.GetPixelFormatAttribivARB = (WGLGETPIXELFORMATATTRIBIVARB_T)
|
||||
window->WGL.GetPixelFormatAttribivARB = (PFNWGLGETPIXELFORMATATTRIBIVARBPROC)
|
||||
wglGetProcAddress("wglGetPixelFormatAttribivARB");
|
||||
|
||||
if (window->WGL.GetPixelFormatAttribivARB)
|
||||
|
||||
Reference in New Issue
Block a user