fix color picking
This commit is contained in:
@@ -286,7 +286,7 @@ int main()
|
||||
while (running)
|
||||
{
|
||||
// If there any message in the queue process it
|
||||
if (PeekMessage(&msg, 0, 0, 0, PM_REMOVE))
|
||||
if (!App::I.redraw && PeekMessage(&msg, 0, 0, 0, PM_REMOVE))
|
||||
{
|
||||
running = !(msg.message == WM_QUIT/* || gl.keys[VK_ESCAPE]*/);
|
||||
DispatchMessage(&msg);
|
||||
@@ -298,10 +298,13 @@ int main()
|
||||
float dt = (float)(t1 - t0) / 1000.0f;
|
||||
if (dt > 1.0f / 60.0f)
|
||||
{
|
||||
App::I.clear();
|
||||
App::I.update((float)(t1 - t0) / 1000.0f);
|
||||
t0 = t1;
|
||||
SwapBuffers(hDC);
|
||||
if (App::I.redraw)
|
||||
{
|
||||
App::I.clear();
|
||||
App::I.update((float)(t1 - t0) / 1000.0f);
|
||||
SwapBuffers(hDC);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -329,6 +332,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
|
||||
case WM_SIZE:
|
||||
App::I.resize((float)LOWORD(lp), (float)HIWORD(lp));
|
||||
App::I.clear();
|
||||
App::I.redraw = true;
|
||||
App::I.update(0.f);
|
||||
SwapBuffers(hDC);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user