|
@@ -364,8 +364,8 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR pCmdLine,
|
|
|
const float triangle_verts[] = {
|
|
const float triangle_verts[] = {
|
|
|
// pos
|
|
// pos
|
|
|
0.0f, 0.5f, 0.0f, // top
|
|
0.0f, 0.5f, 0.0f, // top
|
|
|
- -0.5f, -0.5f, 0.0f, // bottom-left
|
|
|
|
|
- 0.5f, -0.5f, 0.0f // bottom-right
|
|
|
|
|
|
|
+ -0.25f, -0.25f, 0.0f, // bottom-left
|
|
|
|
|
+ 0.25f, -0.25f, 0.0f // bottom-right
|
|
|
|
|
|
|
|
};
|
|
};
|
|
|
// clang-format on
|
|
// clang-format on
|
|
@@ -404,13 +404,13 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR pCmdLine,
|
|
|
|
|
|
|
|
MSG msg = { 0 };
|
|
MSG msg = { 0 };
|
|
|
while (true) {
|
|
while (true) {
|
|
|
- if (GetMessage(&msg, NULL, 0, 0) <= 0) {
|
|
|
|
|
- break;
|
|
|
|
|
|
|
+ if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
|
|
|
|
|
+ TranslateMessage(&msg);
|
|
|
|
|
+ DispatchMessage(&msg);
|
|
|
|
|
+ if (msg.message == WM_QUIT) {
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- TranslateMessage(&msg);
|
|
|
|
|
- DispatchMessage(&msg);
|
|
|
|
|
-
|
|
|
|
|
- printf("MSG LOOP\n");
|
|
|
|
|
|
|
|
|
|
glClear(GL_COLOR_BUFFER_BIT);
|
|
glClear(GL_COLOR_BUFFER_BIT);
|
|
|
|
|
|