diff options
author | chai <chaifix@163.com> | 2019-04-02 08:47:15 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-04-02 08:47:15 +0800 |
commit | 250e30d73f09e9da2b5a81d0fbae63744ae12a73 (patch) | |
tree | 0f55daf334c073e1779d7a1284799a2056aad714 /source/tests/win32/01-window/02_multi_window.cpp | |
parent | 66fe16dd5ed57ae958fc25158d0defae2e6fae6a (diff) |
*misc
Diffstat (limited to 'source/tests/win32/01-window/02_multi_window.cpp')
-rw-r--r-- | source/tests/win32/01-window/02_multi_window.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/source/tests/win32/01-window/02_multi_window.cpp b/source/tests/win32/01-window/02_multi_window.cpp index 99a943f..0237fc9 100644 --- a/source/tests/win32/01-window/02_multi_window.cpp +++ b/source/tests/win32/01-window/02_multi_window.cpp @@ -52,7 +52,13 @@ LONG WINAPI WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { break; case WM_PAINT: wglMakeCurrent(windowData->deviceContext, windowData->renderContext); - glClear(GL_COLOR_BUFFER_BIT); glBegin(GL_TRIANGLES); glVertex2i(0, 1); glVertex2i(-1, -1); glVertex2i(1, -1); glEnd(); glFlush(); + glClear(GL_COLOR_BUFFER_BIT); + glBegin(GL_TRIANGLES); + glVertex2i(0, 1); + glVertex2i(-1, -1); + glVertex2i(1, -1); + glEnd(); + glFlush(); wglMakeCurrent(NULL, NULL); BeginPaint(hWnd, &ps); EndPaint(hWnd, &ps); return 0; @@ -91,10 +97,10 @@ int WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPT wc.lpszClassName = "OpenGL2"; RegisterClass(&wc); - hWnd = CreateWindowEx(WS_EX_WINDOWEDGE,"OpenGL2", "Hi there", WS_VSCROLL|WS_TILEDWINDOW, 0, 0, 640, 480, NULL, NULL, hInstance, NULL); - //hWnd2 = CreateWindow("OpenGL2", "Hi there", WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, 110, 110, 640, 480, NULL, NULL, hInstance, NULL); + hWnd = CreateWindow("OpenGL2", "Hi there", WS_VSCROLL|WS_TILEDWINDOW, 0, 0, 640, 480, NULL, NULL, hInstance, NULL); + hWnd2 = CreateWindow("OpenGL2", "Hi there", WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, 110, 110, 640, 480, NULL, NULL, hInstance, NULL); ShowWindow(hWnd, nCmdShow); - //ShowWindow(hWnd2, nCmdShow); + ShowWindow(hWnd2, nCmdShow); while (GetMessage(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } wglMakeCurrent(NULL, NULL); DestroyWindow(hWnd); |