21 #include "../../SDL_internal.h" 23 #ifndef SDL_windowsopengl_h_ 24 #define SDL_windowsopengl_h_ 26 #if SDL_VIDEO_OPENGL_WGL 31 SDL_bool HAS_WGL_EXT_swap_control_tear;
32 SDL_bool HAS_WGL_ARB_context_flush_control;
33 SDL_bool HAS_WGL_ARB_create_context_robustness;
34 SDL_bool HAS_WGL_ARB_create_context_no_error;
43 } es_profile_max_supported_version;
45 void *(WINAPI * wglGetProcAddress) (
const char *proc);
46 HGLRC(WINAPI * wglCreateContext) (HDC hdc);
47 BOOL(WINAPI * wglDeleteContext) (HGLRC hglrc);
48 BOOL(WINAPI * wglMakeCurrent) (HDC hdc, HGLRC hglrc);
49 BOOL(WINAPI * wglShareLists) (HGLRC hglrc1, HGLRC hglrc2);
50 BOOL(WINAPI * wglChoosePixelFormatARB) (HDC hdc,
51 const int *piAttribIList,
52 const FLOAT * pfAttribFList,
56 BOOL(WINAPI * wglGetPixelFormatAttribivARB) (HDC hdc,
int iPixelFormat,
59 const int *piAttributes,
61 BOOL (WINAPI * wglSwapIntervalEXT) (
int interval);
62 int (WINAPI * wglGetSwapIntervalEXT) (
void);
66 extern int WIN_GL_LoadLibrary(
_THIS,
const char *
path);
67 extern void *WIN_GL_GetProcAddress(
_THIS,
const char *proc);
68 extern void WIN_GL_UnloadLibrary(
_THIS);
74 extern int WIN_GL_SetSwapInterval(
_THIS,
int interval);
75 extern int WIN_GL_GetSwapInterval(
_THIS);
78 extern void WIN_GL_InitExtensions(
_THIS);
81 #ifndef WGL_ARB_pixel_format 82 #define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 83 #define WGL_DRAW_TO_WINDOW_ARB 0x2001 84 #define WGL_DRAW_TO_BITMAP_ARB 0x2002 85 #define WGL_ACCELERATION_ARB 0x2003 86 #define WGL_NEED_PALETTE_ARB 0x2004 87 #define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005 88 #define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006 89 #define WGL_SWAP_METHOD_ARB 0x2007 90 #define WGL_NUMBER_OVERLAYS_ARB 0x2008 91 #define WGL_NUMBER_UNDERLAYS_ARB 0x2009 92 #define WGL_TRANSPARENT_ARB 0x200A 93 #define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037 94 #define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038 95 #define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039 96 #define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A 97 #define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B 98 #define WGL_SHARE_DEPTH_ARB 0x200C 99 #define WGL_SHARE_STENCIL_ARB 0x200D 100 #define WGL_SHARE_ACCUM_ARB 0x200E 101 #define WGL_SUPPORT_GDI_ARB 0x200F 102 #define WGL_SUPPORT_OPENGL_ARB 0x2010 103 #define WGL_DOUBLE_BUFFER_ARB 0x2011 104 #define WGL_STEREO_ARB 0x2012 105 #define WGL_PIXEL_TYPE_ARB 0x2013 106 #define WGL_COLOR_BITS_ARB 0x2014 107 #define WGL_RED_BITS_ARB 0x2015 108 #define WGL_RED_SHIFT_ARB 0x2016 109 #define WGL_GREEN_BITS_ARB 0x2017 110 #define WGL_GREEN_SHIFT_ARB 0x2018 111 #define WGL_BLUE_BITS_ARB 0x2019 112 #define WGL_BLUE_SHIFT_ARB 0x201A 113 #define WGL_ALPHA_BITS_ARB 0x201B 114 #define WGL_ALPHA_SHIFT_ARB 0x201C 115 #define WGL_ACCUM_BITS_ARB 0x201D 116 #define WGL_ACCUM_RED_BITS_ARB 0x201E 117 #define WGL_ACCUM_GREEN_BITS_ARB 0x201F 118 #define WGL_ACCUM_BLUE_BITS_ARB 0x2020 119 #define WGL_ACCUM_ALPHA_BITS_ARB 0x2021 120 #define WGL_DEPTH_BITS_ARB 0x2022 121 #define WGL_STENCIL_BITS_ARB 0x2023 122 #define WGL_AUX_BUFFERS_ARB 0x2024 123 #define WGL_NO_ACCELERATION_ARB 0x2025 124 #define WGL_GENERIC_ACCELERATION_ARB 0x2026 125 #define WGL_FULL_ACCELERATION_ARB 0x2027 126 #define WGL_SWAP_EXCHANGE_ARB 0x2028 127 #define WGL_SWAP_COPY_ARB 0x2029 128 #define WGL_SWAP_UNDEFINED_ARB 0x202A 129 #define WGL_TYPE_RGBA_ARB 0x202B 130 #define WGL_TYPE_COLORINDEX_ARB 0x202C 133 #ifndef WGL_ARB_multisample 134 #define WGL_SAMPLE_BUFFERS_ARB 0x2041 135 #define WGL_SAMPLES_ARB 0x2042 void * SDL_GLContext
An opaque handle to an OpenGL context.
EGLSurface EGLNativeWindowType * window
SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char const char SDL_SCANF_FORMAT_STRING const char return SDL_ThreadFunction const char void return Uint32 return Uint32 void
The type used to identify a window.
GLsizei const GLchar *const * path