Zhiyi Zhang : opengl32/tests: Test wglCopyContext().
Alexandre Julliard
julliard at winehq.org
Thu Jul 14 16:59:25 CDT 2022
Module: wine
Branch: master
Commit: c0f4f31cdb26fcb12be71c32402474dd393f820d
URL: https://gitlab.winehq.org/wine/wine/-/commit/c0f4f31cdb26fcb12be71c32402474dd393f820d
Author: Zhiyi Zhang <zzhang at codeweavers.com>
Date: Tue Apr 26 15:38:24 2022 +0800
opengl32/tests: Test wglCopyContext().
Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
---
dlls/opengl32/tests/opengl.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/dlls/opengl32/tests/opengl.c b/dlls/opengl32/tests/opengl.c
index f05bb09d4b6..7d407a1d0b0 100644
--- a/dlls/opengl32/tests/opengl.c
+++ b/dlls/opengl32/tests/opengl.c
@@ -1875,6 +1875,26 @@ static void test_wglChoosePixelFormatARB(HDC hdc)
}
}
+static void test_copy_context(HDC hdc)
+{
+ HGLRC ctx, ctx2;
+ BOOL ret;
+
+ ctx = wglCreateContext(hdc);
+ ok(!!ctx, "Failed to create GL context, last error %#lx.\n", GetLastError());
+ ctx2 = wglCreateContext(hdc);
+ ok(!!ctx2, "Failed to create GL context, last error %#lx.\n", GetLastError());
+
+ ret = wglCopyContext(ctx, ctx2, GL_ALL_ATTRIB_BITS);
+ todo_wine
+ ok(ret, "Failed to copy GL context, last error %#lx.\n", GetLastError());
+
+ ret = wglDeleteContext(ctx2);
+ ok(ret, "Failed to delete GL context, last error %#lx.\n", GetLastError());
+ ret = wglDeleteContext(ctx);
+ ok(ret, "Failed to delete GL context, last error %#lx.\n", GetLastError());
+}
+
START_TEST(opengl)
{
HWND hwnd;
@@ -1960,6 +1980,7 @@ START_TEST(opengl)
test_getprocaddress(hdc);
test_deletecontext(hwnd, hdc);
test_makecurrent(hdc);
+ test_copy_context(hdc);
/* The lack of wglGetExtensionsStringARB in general means broken software rendering or the lack of decent OpenGL support, skip tests in such cases */
if (!pwglGetExtensionsStringARB)
More information about the wine-cvs
mailing list