Don't create an ortho matrix when the viewport is 0 in any axis.
Not all compilers divide by 0 and return inf, some segfault. The matrix is not used by anything when minimized, so it just needs to not be called.
This commit is contained in:
parent
75c6fd047b
commit
3104e805b4
1 changed files with 9 additions and 1 deletions
|
|
@ -19,8 +19,10 @@
|
|||
*
|
||||
********************************************************************************************/
|
||||
|
||||
#include "TPOrbitCamera.h"
|
||||
#include "raylib.h"
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
|
|
@ -28,6 +30,11 @@ int main(void)
|
|||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
TPOrbitCamera cam;
|
||||
InitTPOrbitCamera(&cam, 45, (Vector3) { 0, 0, 0 });
|
||||
|
||||
SetConfigFlags(FLAG_WINDOW_HIGHDPI)
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - basic window");
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
|
|
|
|||
Loading…
Reference in a new issue