Skip to content

Commit

Permalink
Renderer: recalculate projection matrix only when renderer is active
Browse files Browse the repository at this point in the history
  • Loading branch information
julianxhokaxhiu committed Feb 19, 2023
1 parent 450a1fc commit 9c034b1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -469,9 +469,6 @@ void Renderer::recalcInternals()
viewWidth = window_size_x;
viewHeight = window_size_y;

// backend projection matrix
calcBackendProjMatrix();

// aspect correction
switch(aspect_ratio){
case AR_ORIGINAL:
Expand Down Expand Up @@ -798,6 +795,8 @@ void Renderer::reset()
{
recalcInternals();

calcBackendProjMatrix();

prepareFramebuffer();

if(!ff8 && enable_lighting) prepareShadowMap();
Expand Down

0 comments on commit 9c034b1

Please sign in to comment.