mirror of https://github.com/bjornbytes/lovr.git
Add extra room to transform stack;
Currently the transform stack doesn't take into account the fact that internal functions use transforms. Performing error checking for the transform stack in the internal functions is kind of difficult (right now we just segfault), so it's easier to just reserve a few of the transforms for internal use.
This commit is contained in:
parent
827c92cc38
commit
24a980446a
|
@ -9,8 +9,9 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#define MAX_TRANSFORMS 64
|
||||
#define MAX_CANVASES 4
|
||||
#define MAX_TRANSFORMS 60
|
||||
#define INTERNAL_TRANSFORMS 4
|
||||
|
||||
typedef enum {
|
||||
BLEND_ALPHA,
|
||||
|
@ -77,7 +78,7 @@ typedef struct {
|
|||
Font* defaultFont;
|
||||
Texture* activeTexture;
|
||||
Texture* defaultTexture;
|
||||
float transforms[MAX_TRANSFORMS][16];
|
||||
float transforms[MAX_TRANSFORMS + INTERNAL_TRANSFORMS][16];
|
||||
CanvasState* canvases[MAX_CANVASES];
|
||||
int transform;
|
||||
int canvas;
|
||||
|
|
Loading…
Reference in New Issue