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:
Jeffery Myers 2021-01-02 09:39:08 -08:00
commit 3104e805b4

View file

@ -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