Added preview window when selecting a camera in the scene
This commit is contained in:
@@ -149,9 +149,6 @@ void Window::Draw()
|
||||
|
||||
cam->AspectRatio = size.x / size.y;
|
||||
|
||||
float resolutionScale = glm::clamp(Engine::GetProject()->Settings.ResolutionScale, 0.5f, 2.0f);
|
||||
this->scene->m_EditorCamera->OnWindowResize(size.x * resolutionScale, size.y * resolutionScale);
|
||||
|
||||
if (Engine::IsPlayMode())
|
||||
{
|
||||
ZoneScopedN("PIE Draw");
|
||||
@@ -160,6 +157,8 @@ void Window::Draw()
|
||||
else
|
||||
{
|
||||
ZoneScopedN("Non-playmode Draw");
|
||||
float resolutionScale = glm::clamp(Engine::GetProject()->Settings.ResolutionScale, 0.5f, 2.0f);
|
||||
this->scene->m_EditorCamera->OnWindowResize(size.x * resolutionScale, size.y * resolutionScale);
|
||||
this->scene->Draw(*this->framebuffer.get(), this->scene->m_EditorCamera->GetPerspective(), this->scene->m_EditorCamera->GetTransform());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user