Render skyboxes with rotation-only view matrix, a few new CDrawUtil overloads, other rendering tweaks

This commit is contained in:
parax0
2015-08-23 21:03:36 -04:00
parent 614f73487e
commit db970c6c51
8 changed files with 34 additions and 13 deletions

View File

@@ -67,7 +67,6 @@ void CEditorGLWidget::paintGL()
// Camera movement is processed here in order to sync it with the paint event
// This way movement happens exactly once per frame - no more, no less
ProcessInput(DeltaTime);
mCamera.LoadMatrices();
// Pre-render signal allows for per-frame operations to be performed before the draw happens
emit PreRender();

View File

@@ -387,9 +387,10 @@ void CWorldEditor::ViewportRender(CCamera& Camera)
if (mDrawSky)
{
CModel *pSky = mpSceneManager->GetActiveSkybox();
if (pSky) mpRenderer->RenderSky(pSky, Camera.Position());
if (pSky) mpRenderer->RenderSky(pSky, Camera);
}
Camera.LoadMatrices();
mpRenderer->RenderBuckets(Camera);
mpRenderer->RenderBloom();

View File

@@ -95,7 +95,7 @@ void CWorldEditorWindow::PaintViewport(double DeltaTime)
if (mShouldDrawSky)
{
CModel *pSky = mpSceneManager->GetActiveSkybox();
if (pSky) mpRenderer->RenderSky(pSky, mCamera.Position());
if (pSky) mpRenderer->RenderSky(pSky, mCamera);
}
mpRenderer->RenderBuckets(mCamera);