26#define MAX_FORMATS 256
52static void (
WINAPI *pglDebugMessageCallbackARB)(
void *,
void *);
60#define GET_PROC(func) \
61 p ## func = (void*)wglGetProcAddress(#func); \
63 trace("wglGetProcAddress(%s) failed\n", #func);
66 GET_PROC(wglCreateContextAttribsARB);
77 GET_PROC(wglGetPixelFormatAttribivARB)
98 size_t ext_str_len =
strlen(extension_string);
108 while (!
isspace(*extensions) && *extensions)
115 if (
len == ext_str_len && !
memcmp(
start, extension_string, ext_str_len))
128 unsigned int nOnscreenFormats;
129 unsigned int nFormats;
147 skip(
"No pbuffer compatible formats found while WGL_ARB_pbuffer is supported\n");
150 trace(
"nOnscreenFormats: %d\n", nOnscreenFormats);
151 trace(
"Total number of pbuffer capable pixelformats: %d\n", nFormats);
154 for(
i=0;
i < nFormats;
i++)
157 if(iFormats[
i] <= nOnscreenFormats)
179 skip(
"Pbuffer creation failed!\n");
182 pbuffer_hdc = pwglGetPbufferDCARB(pbuffer);
185 trace(
"iPixelFormat returned by GetPixelFormat: %d\n",
res);
188 pwglReleasePbufferDCARB(pbuffer, pbuffer_hdc);
190 else skip(
"Pbuffer test for onscreen pixelformat skipped as no onscreen format with pbuffer capabilities have been found\n");
195 if(iFormats[
i] > nOnscreenFormats)
210 pbuffer_hdc = pwglGetPbufferDCARB(pbuffer);
213 ok(
res == 1,
"Unexpected iPixelFormat=%d (1 expected) returned by GetPixelFormat for offscreen format %d\n",
res,
iPixelFormat);
214 trace(
"iPixelFormat returned by GetPixelFormat: %d\n",
res);
216 pwglReleasePbufferDCARB(pbuffer,
hdc);
218 else skip(
"Pbuffer creation failed!\n");
220 else skip(
"Pbuffer test for offscreen pixelformat skipped as no offscreen-only format with pbuffer capabilities has been found\n");
240 "DescribePixelFormat failed with error: %u\n",
GetLastError());
274 ok(
test_pfd(&
pfd,
NULL),
"PFD_DOUBLEBUFFER_DONTCARE|PFD_STEREO_DONTCARE failed\n" );
279 ok(
test_pfd(&
pfd, &ret_fmt),
"Invalid pixel format 32 failed\n" );
282 ok(
test_pfd(&
pfd, &ret_fmt),
"Invalid pixel format 33 failed\n" );
285 ok(
test_pfd(&
pfd, &ret_fmt),
"Invalid pixel format 15 failed\n" );
294 ok(
test_pfd(&
pfd,
NULL),
"PFD_DOUBLEBUFFER_DONTCARE|PFD_STEREO_DONTCARE failed\n" );
305 ok(
test_pfd(&
pfd,
NULL),
"PFD_DOUBLEBUFFER_DONTCARE|PFD_STEREO_DONTCARE failed\n" );
316 ok(
test_pfd(&
pfd,
NULL),
"PFD_DOUBLEBUFFER_DONTCARE|PFD_STEREO_DONTCARE failed\n" );
327 ok(
test_pfd(&
pfd,
NULL),
"PFD_DOUBLEBUFFER_DONTCARE|PFD_STEREO_DONTCARE failed\n" );
343 static const char testmsg[] =
"Hello World";
346 if (!pglDebugMessageCallbackARB)
348 skip(
"glDebugMessageCallbackARB not supported\n");
396 ok(
hdc != 0,
"GetDC(0) failed!\n");
400 ok(pf != 0,
"ChoosePixelFormat failed on main device context\n");
406 trace(
"SetPixelFormat on main device context %s\n",
res ?
"succeeded" :
"failed");
412 for(
i = 1;
i <= nCfgs;
i++)
415 if(
i == pf)
ok(
res,
"Failed to set the same pixel format\n");
416 else ok(!
res,
"Unexpectedly set an alternate pixel format\n");
426 ok( pf != 0,
"ChoosePixelFormat failed\n" );
428 ok(
res != 0,
"SetPixelFormat failed\n" );
430 ok(
i == pf,
"GetPixelFormat returned wrong format %d/%d\n",
i, pf );
434 ok(
i == pf,
"GetPixelFormat returned wrong format %d/%d\n",
i, pf );
440 ok(
i == 0,
"GetPixelFormat succeeded\n" );
444 ok( !
res,
"SetPixelFormat succeeded\n" );
448 ok( !
res,
"DescribePixelFormat succeeded\n" );
452 ok( !pf,
"ChoosePixelFormat succeeded\n" );
456 ok( !
res,
"SwapBuffers succeeded\n" );
470 ok( pf != 0,
"ChoosePixelFormat failed\n" );
472 ok(
res != 0,
"SetPixelFormat failed\n" );
474 ok(
i == pf,
"GetPixelFormat returned wrong format %d/%d\n",
i, pf );
482 HGLRC hglrc1, hglrc2, hglrc3;
487 ok(
res ==
FALSE,
"Sharing display lists for no contexts passed!\n");
494 ok(
res,
"Sharing of display lists failed\n");
503 ok(
res,
"Make current failed\n");
505 ok(
res,
"Sharing display lists with a destination context which has been made current failed\n");
516 ok(
res ==
FALSE,
"Sharing of display lists passed for a context which already shared lists before\n");
525 ok(
res,
"Make current failed\n");
527 ok(
res,
"Sharing display lists with a source context which has been made current failed\n");
539 ok(
hglrc != 0,
"wglCreateContext failed\n" );
542 ok(
ret,
"wglMakeCurrent failed\n" );
548 ok(
ret,
"wglMakeCurrent failed\n" );
552 ok(
ret,
"wglMakeCurrent failed\n" );
555 ok(
ret,
"wglMakeCurrent failed\n" );
561 "Expected ERROR_INVALID_HANDLE, got error=%x\n",
GetLastError() );
564 ok(
ret,
"wglMakeCurrent failed\n" );
567 ok(
ret,
"wglMakeCurrent failed\n" );
570 ok(
ret,
"wglMakeCurrent failed\n" );
578 "Expected ERROR_INVALID_HANDLE, got error=%x\n",
GetLastError() );
581 ok(
ret,
"wglMakeCurrent failed\n" );
590 unsigned int nFormats;
594 if (!pwglChoosePixelFormatARB)
596 win_skip(
"wglChoosePixelFormatARB is not available\n");
604 skip(
"No suitable pixel formats found\n");
612 skip(
"wglGetPixelFormatAttribivARB failed\n");
615 iAttribRet[1] += iAttribRet[2]+iAttribRet[3]+iAttribRet[4];
616 ok(iAttribRet[0] == iAttribRet[1],
"WGL_COLOR_BITS_ARB (%d) does not equal R+G+B+A (%d)!\n",
617 iAttribRet[0], iAttribRet[1]);
624 unsigned int nFormats;
628 if (!pwglGetPixelFormatAttribivARB)
630 win_skip(
"wglGetPixelFormatAttribivARB is not available\n");
638 iAttribList, iAttribRet);
643 ok(!(iAttribRet[0] && iAttribRet[1]),
"GDI support and double buffering on pixel format %d\n",
iPixelFormat);
651 unsigned int nFormats;
656 if (!pwglGetPixelFormatAttribivARB)
658 win_skip(
"wglGetPixelFormatAttribivARB is not available\n");
666 iAttribList, iAttribRet);
674 switch(iAttribRet[0])
693 unsigned int nFormats;
730 trace(
"testing on %s\n", use_dib ?
"DIB" :
"DDB" );
734 for(
i=1;
i<=nFormats;
i++)
751 skip(
"Unable to find a suitable pixel format\n");
756 ok(
ret,
"SetPixelFormat failed\n" );
760 ok( !
ret,
"SetPixelFormat succeeded\n" );
769 ok(hglrc2 !=
NULL,
"Unable to create a context\n");
772 glClearColor((
float)0x22/0xff, (
float)0x33/0xff, (
float)0x44/0xff, (
float)0x11/0xff);
777 ok( viewport[0] == 0 && viewport[1] == 0 && viewport[2] == 4 && viewport[3] == 4,
778 "wrong viewport %d,%d,%d,%d\n", viewport[0], viewport[1], viewport[2], viewport[3] );
781 for (
i = 0;
i < 16;
i++)
782 ok(dstBuffer[
i] == 0x223344 || dstBuffer[
i] == 0x11223344,
"Received color=%x at %u\n",
789 ok( !
ret,
"SetPixelFormat succeeded\n" );
792 glClearColor((
float)0x44/0xff, (
float)0x33/0xff, (
float)0x22/0xff, (
float)0x11/0xff);
796 ok( viewport[0] == 0 && viewport[1] == 0 && viewport[2] == 4 && viewport[3] == 4,
797 "wrong viewport %d,%d,%d,%d\n", viewport[0], viewport[1], viewport[2], viewport[3] );
801 glClearColor((
float)0x44/0xff, (
float)0x55/0xff, (
float)0x66/0xff, (
float)0x11/0xff);
805 ok( viewport[0] == 0 && viewport[1] == 0 && viewport[2] == 4 && viewport[3] == 4,
806 "wrong viewport %d,%d,%d,%d\n", viewport[0], viewport[1], viewport[2], viewport[3] );
810 ok( viewport[0] == 0 && viewport[1] == 0 && viewport[2] == 12 && viewport[3] == 12,
811 "wrong viewport %d,%d,%d,%d\n", viewport[0], viewport[1], viewport[2], viewport[3] );
815 ok( viewport[0] == 0 && viewport[1] == 0 && viewport[2] == 4 && viewport[3] == 4,
816 "wrong viewport %d,%d,%d,%d\n", viewport[0], viewport[1], viewport[2], viewport[3] );
822 ok( !
ret,
"SetPixelFormat succeeded\n" );
825 ok( viewport[0] == 0 && viewport[1] == 0 && viewport[2] == 12 && viewport[3] == 12,
826 "wrong viewport %d,%d,%d,%d\n", viewport[0], viewport[1], viewport[2], viewport[3] );
857 "Expected NULL string when no active context is set\n");
879 ok(
res ==
FALSE,
"wglDeleteContext succeeded\n");
884 skip(
"wglCreateContext failed!\n");
891 skip(
"wglMakeCurrent failed!\n");
902 ok(!!thread_handle,
"Failed to create thread, last error %#x.\n",
GetLastError());
906 ok(!thread_params.
make_current,
"Attempt to make WGL context from another thread passed\n");
908 ok(!thread_params.
deleted,
"Attempt to delete WGL context from another thread passed\n");
914 ok(
res ==
TRUE,
"wglDeleteContext failed\n");
919 ok(
res ==
FALSE,
"wglDeleteContext succeeded\n");
925 ok(
hglrc ==
NULL,
"A WGL context is active while none was expected\n");
937 skip(
"skipping wglGetProcAddress tests because no GL extensions supported\n");
945 ok(
func ==
NULL,
"Lookup of function glEnable with a context passed, expected a failure\n");
948 ok(
func ==
NULL,
"Lookup of function glEnable without a context passed, expected a failure\n");
960 skip(
"skipping test because lack of GL_ARB_multitexture support\n");
970 ok(
func ==
NULL,
"Function lookup without a context passed, expected a failure; last error %#x\n",
GetLastError());
982 skip(
"wglCreateContext failed!\n");
989 skip(
"wglMakeCurrent failed!\n");
994 hread = pwglGetCurrentReadDCARB();
996 ok(
hread ==
hdc,
"wglGetCurrentReadDCARB failed for standard wglMakeCurrent\n");
999 hread = pwglGetCurrentReadDCARB();
1000 ok(
hread ==
hdc,
"wglGetCurrentReadDCARB failed for wglMakeContextCurrent\n");
1014 ok(pf1 == pf2,
"Second DC does not have the same format (%d != %d)\n", pf1, pf2);
1017 skip(
"Could not get a different DC for the window\n");
1027#define NVIDIA_HRESULT_FROM_WIN32(x) (HRESULT_FROM_WIN32(x) | 0x40000000)
1035 gl3Ctx = pwglCreateContextAttribsARB(
hdc, 0,
attribs);
1036 ok(gl3Ctx != 0,
"pwglCreateContextAttribsARB for a 1.x context failed!\n");
1045 gl3Ctx = pwglCreateContextAttribsARB((
HDC)0xdeadbeef, 0, 0);
1046 ok(gl3Ctx == 0,
"pwglCreateContextAttribsARB using an invalid HDC passed\n");
1051 "Expected ERROR_DC_NOT_FOUND, got error=%x\n",
error);
1060 gl3Ctx = pwglCreateContextAttribsARB(
hdc, (
HGLRC)0xdeadbeef, 0);
1061 ok(gl3Ctx == 0,
"pwglCreateContextAttribsARB using an invalid shareList passed\n");
1076 skip(
"Skipping the rest of the WGL_ARB_create_context test due to lack of OpenGL 3.0\n");
1091 ok(gl3Ctx !=
NULL,
"Sharing of a display list between OpenGL 3.0 and OpenGL 1.x/2.x failed!\n");
1095 gl3Ctx = pwglCreateContextAttribsARB(
hdc, glCtx, attribs_future);
1096 ok(gl3Ctx !=
NULL,
"Sharing of a display list between a forward compatible OpenGL 3.0 context and OpenGL 1.x/2.x failed!\n");
1110 gl3Ctx = pwglCreateContextAttribsARB(
hdc, 0,
attribs);
1111 ok(gl3Ctx != 0,
"pwglCreateContextAttribsARB for a 3.0 context failed!\n");
1119 ok(
res ==
FALSE,
"Wow, OpenGL 3.0 windowless rendering passed while it was expected not to!\n");
1161 ok(!!
dc,
"Failed to get DC.\n");
1166 win_skip(
"Failed to find pixel format.\n");
1232 ok(!!
dc,
"Failed to get DC.\n");
1237 win_skip(
"Failed to find pixel format.\n");
1254 ok(
EqualRect(&
r, &vp),
"Viewport not equal to client rect.\n");
1299 win_skip(
"HWND_MESSAGE not supported\n" );
1303 ok(!!
dc,
"Failed to get DC.\n");
1308 win_skip(
"Failed to find pixel format.\n");
1325 ok(
EqualRect(&
r, &vp),
"Viewport not equal to client rect.\n");
1330 ok(glerr ==
GL_NO_ERROR,
"Failed glClear, error %#x.\n", glerr);
1374 ok(!!oldctx,
"Expected to find a valid current context.\n");
1377 WS_POPUP, 0, 0, 640, 480, 0, 0, 0, 0);
1381 ok(!!
dc,
"Failed to get DC.\n");
1386 win_skip(
"Failed to find pixel format.\n");
1404 ok(glerr ==
GL_NO_ERROR,
"Failed glClear, error %#x.\n", glerr);
1417 "Unexpected behavior when making context current, ret %d, last error %#x.\n",
ret,
err);
1428 ok(glerr ==
GL_NO_ERROR,
"Failed glClear, error %#x.\n", glerr);
1450 "Unexpected behavior when making context current, ret %d, last error %#x.\n",
ret,
err);
1462 "Unexpected behavior when making context current, ret %d, last error %#x.\n",
ret,
err);
1497 HWND draw_window, read_window;
1500 HDC read_dc, draw_dc;
1505 ok(!!oldctx,
"Expected to find a valid current context\n");
1508 WS_POPUP, 0, 0, 640, 480, 0, 0, 0, 0);
1509 ok(!!draw_window,
"Failed to create window, last error %#x.\n",
GetLastError());
1511 draw_dc =
GetDC(draw_window);
1512 ok(!!draw_dc,
"Failed to get DC.\n");
1517 win_skip(
"Failed to find pixel format.\n");
1527 WS_POPUP, 0, 0, 640, 480, 0, 0, 0, 0);
1528 ok(!!read_window,
"Failed to create window, last error %#x.\n",
GetLastError());
1530 read_dc =
GetDC(read_window);
1531 ok(!!draw_dc,
"Failed to get DC.\n");
1536 win_skip(
"Failed to find pixel format.\n");
1550 ret = pwglMakeContextCurrentARB(draw_dc, read_dc,
ctx);
1556 ok(glerr ==
GL_NO_ERROR,
"Failed glCopyPixel, error %#x.\n", glerr);
1570 ok(glerr ==
GL_NO_ERROR,
"Failed glCopyPixel, error %#x.\n", glerr);
1576 ok(glerr ==
GL_NO_ERROR,
"Failed glClear, error %#x.\n", glerr);
1586 ret = pwglMakeContextCurrentARB(draw_dc, read_dc,
ctx);
1589 "Unexpected behavior when making context current, ret %d, last error %#x.\n",
ret,
err);
1605 ret = pwglMakeContextCurrentARB(draw_dc, read_dc,
ctx);
1608 "Unexpected behavior when making context current, ret %d, last error %#x.\n",
ret,
err);
1618 ret = pwglMakeContextCurrentARB(draw_dc, read_dc,
ctx);
1621 "Unexpected behavior when making context current, last error %#x.\n",
err);
1656 HWND window1, window2, old_parent;
1657 HGLRC ctx1, ctx2, oldctx;
1663 ok(!!oldctx,
"Expected to find a valid current context.\n");
1666 WS_POPUP, 0, 0, 640, 480, 0, 0, 0, 0);
1667 ok(!!window1,
"Failed to create window1, last error %#x.\n",
GetLastError());
1669 dc1 =
GetDC(window1);
1670 ok(!!dc1,
"Failed to get DC.\n");
1675 win_skip(
"Failed to find pixel format.\n");
1685 ok(!!ctx1,
"Failed to create GL context, last error %#x.\n",
GetLastError());
1690 interval = pwglGetSwapIntervalEXT();
1693 ret = pwglSwapIntervalEXT(0);
1696 interval = pwglGetSwapIntervalEXT();
1701 ok(!!ctx2,
"Failed to create GL context, last error %#x.\n",
GetLastError());
1706 interval = pwglGetSwapIntervalEXT();
1713 WS_POPUP, 0, 0, 640, 480, 0, 0, 0, 0);
1714 ok(!!window2,
"Failed to create window2, last error %#x.\n",
GetLastError());
1716 dc2 =
GetDC(window2);
1717 ok(!!dc2,
"Failed to get DC.\n");
1728 interval = pwglGetSwapIntervalEXT();
1735 old_parent =
SetParent(window1, window2);
1736 ok(!!old_parent,
"Failed to make window1 a child of window2, last error %#x.\n",
GetLastError());
1738 interval = pwglGetSwapIntervalEXT();
1795 win_skip(
"Unable to find pixel format.\n");
1801 ok(
hglrc ==
NULL,
"wglCreateContext should fail when no pixel format has been set, but it passed\n");
1816 "Expected NULL string when no active context is set\n");
1819 ok(
res,
"wglMakeCurrent failed!\n");
1828 skip(
"Skipping OpenGL tests without a current context\n");
1843 win_skip(
"wglGetExtensionsStringARB is not available\n");
1857 if(
wgl_extensions ==
NULL)
skip(
"Skipping opengl32 tests because this OpenGL implementation doesn't support WGL extensions!\n");
1868 skip(
"WGL_ARB_make_current_read not supported, skipping test\n");
1873 skip(
"WGL_ARB_pbuffer not supported, skipping pbuffer test\n");
1878 skip(
"WGL_EXT_swap_control not supported, skipping test\n");
char * strstr(char *String1, char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
#define ERROR_INVALID_HANDLE
static void cleanup(void)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
GLAPI void GLAPIENTRY glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)
GLAPI void GLAPIENTRY glEnable(GLenum cap)
GLAPI void GLAPIENTRY glFinish(void)
GLuint GLuint GLsizei GLenum type
#define GL_INVALID_OPERATION
#define GL_COLOR_BUFFER_BIT
GLAPI GLenum GLAPIENTRY glGetError(void)
GLuint GLuint GLsizei count
GLdouble GLdouble GLdouble r
GLAPI void GLAPIENTRY glDisable(GLenum cap)
GLAPI void GLAPIENTRY glGetIntegerv(GLenum pname, GLint *params)
GLAPI const GLubyte *GLAPIENTRY glGetString(GLenum name)
GLAPI void GLAPIENTRY glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
GLAPI void GLAPIENTRY glClear(GLbitfield mask)
GLuint GLsizei GLsizei * length
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static void test_destroy(void)
static IHTMLWindow2 * window
static HGLRC(WINAPI *pwglCreateContextAttribsARB)(HDC hDC
static void *static GLsizei
static void WINAPI gl_debug_message_callback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, const void *userParam)
static void test_sharelists(HDC winhdc)
static DWORD WINAPI wgl_thread(void *param)
static void test_makecurrent(HDC winhdc)
static const char *static const char * wgl_extensions
static void test_colorbits(HDC hdc)
static const int const FLOAT UINT
static HGLRC hShareContext
static void test_choosepixelformat(void)
static HGLRC const int * attribList
static const int const FLOAT int UINT *static const int int *static HPBUFFERARB(WINAPI *pwglCreatePbufferARB)(HDC
static void test_getprocaddress(HDC hdc)
static const char *WINAPI * pwglGetExtensionsStringARB(HDC)
static void test_pbuffers(HDC hdc)
static void test_dc(HWND hwnd, HDC hdc)
static void test_make_current_read(HDC hdc)
static void test_message_window(void)
#define NVIDIA_HRESULT_FROM_WIN32(x)
static void *static GLenum
static void test_bitmap_rendering(BOOL use_dib)
static void test_window_dc(void)
static void test_opengl3(HDC hdc)
static void *static const GLuint GLboolean
static void test_minimized(void)
static BOOL gl_extension_supported(const char *extensions, const char *extension_string)
static void test_acceleration(HDC hdc)
static void test_debug_message_callback(void)
static void test_deletecontext(HWND hwnd, HDC hdc)
static void test_gdi_dbuf(HDC hdc)
static void init_functions(void)
static void test_setpixelformat(HDC winhdc)
static int test_pfd(const PIXELFORMATDESCRIPTOR *pfd, PIXELFORMATDESCRIPTOR *fmt)
static void test_swap_control(HDC oldhdc)
static void test_destroy_read(HDC oldhdc)
static const int const FLOAT int UINT *static int
#define WS_OVERLAPPEDWINDOW
static PIXELFORMATDESCRIPTOR pfd
BITMAPINFOHEADER bmiHeader
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
BOOL WINAPI wglDeleteContext(HGLRC hglrc)
PROC WINAPI wglGetProcAddress(LPCSTR name)
HGLRC WINAPI wglGetCurrentContext(void)
HGLRC WINAPI wglCreateContext(HDC hdc)
BOOL WINAPI wglMakeCurrent(HDC hdc, HGLRC hglrc)
BOOL WINAPI wglShareLists(HGLRC hglrcSrc, HGLRC hglrcDst)
#define WGL_CONTEXT_MINOR_VERSION_ARB
#define WGL_ACCELERATION_ARB
#define GL_DEBUG_SEVERITY_LOW
#define WGL_BLUE_BITS_ARB
#define GL_DEBUG_TYPE_OTHER
#define WGL_GREEN_BITS_ARB
#define GL_DEBUG_SOURCE_APPLICATION
#define WGL_GENERIC_ACCELERATION_ARB
#define WGL_ALPHA_BITS_ARB
#define WGL_CONTEXT_MAJOR_VERSION_ARB
#define WGL_NO_ACCELERATION_ARB
#define WGL_DOUBLE_BUFFER_ARB
#define WGL_DRAW_TO_PBUFFER_ARB
#define WGL_CONTEXT_FLAGS_ARB
#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB
#define WGL_SUPPORT_GDI_ARB
#define GL_DEBUG_OUTPUT_SYNCHRONOUS
#define WGL_FULL_ACCELERATION_ARB
#define WGL_COLOR_BITS_ARB
HBITMAP WINAPI CreateDIBSection(HDC hDC, CONST BITMAPINFO *BitmapInfo, UINT Usage, VOID **Bits, HANDLE hSection, DWORD dwOffset)
DWORD WINAPI GetLastError(void)
#define ERROR_INVALID_OPERATION
#define ERROR_INVALID_PIXEL_FORMAT
#define ERROR_DC_NOT_FOUND
#define ERROR_DS_GENERIC_ERROR
#define ERROR_INVALID_DATA
int WINAPI GetPixelFormat(_In_ HDC)
int WINAPI ChoosePixelFormat(_In_ HDC hdc, _In_ const PIXELFORMATDESCRIPTOR *ppfd)
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)
BOOL WINAPI SetPixelFormat(_In_ HDC, _In_ int, _In_ const PIXELFORMATDESCRIPTOR *)
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
#define PFD_SUPPORT_OPENGL
#define PFD_STEREO_DONTCARE
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR
int WINAPI DescribePixelFormat(_In_ HDC hdc, _In_ int iPixelFormat, _In_ UINT nBytes, _Out_writes_bytes_opt_(nBytes) LPPIXELFORMATDESCRIPTOR ppfd)
BOOL WINAPI SwapBuffers(HDC)
#define PFD_DRAW_TO_BITMAP
#define PFD_GENERIC_FORMAT
#define PFD_DOUBLEBUFFER_DONTCARE
#define PFD_DRAW_TO_WINDOW
#define PFD_GENERIC_ACCELERATED
BOOL WINAPI DeleteDC(_In_ HDC)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HDC WINAPI GetWindowDC(_In_opt_ HWND)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
LONG WINAPI GetWindowLongA(_In_ HWND, _In_ int)
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
HWND WINAPI SetParent(_In_ HWND, _In_opt_ HWND)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL WINAPI EqualRect(_In_ LPCRECT, _In_ LPCRECT)