updates, fixes and merge in master
This commit is contained in:
@@ -159,6 +159,25 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
}
|
||||
break;
|
||||
case WM_SIZE:
|
||||
{
|
||||
if (wiRenderer::graphicsDevice)
|
||||
{
|
||||
int width = LOWORD(lParam);
|
||||
int height = HIWORD(lParam);
|
||||
|
||||
wiRenderer::GetDevice()->SetResolution(width, height);
|
||||
|
||||
wiSceneSystem::Scene& scene = wiRenderer::GetScene();
|
||||
|
||||
wiSceneSystem::CameraComponent* camera = scene.cameras.GetComponent(wiRenderer::getCameraID());
|
||||
if (camera != nullptr)
|
||||
{
|
||||
camera->CreatePerspective((float)wiRenderer::GetInternalResolution().x, (float)wiRenderer::GetInternalResolution().y, 0.1f, 800);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case WM_KEYDOWN:
|
||||
switch (wParam)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user