Alloc custom allocators on standalone mode
This commit is contained in:
parent
87b75a6c95
commit
4ad81ba2d4
1 changed files with 11 additions and 0 deletions
11
src/rlgl.h
11
src/rlgl.h
|
@ -72,6 +72,17 @@
|
|||
#else
|
||||
#define RLAPI // We are building or using raylib as a static library (or Linux shared library)
|
||||
#endif
|
||||
|
||||
// Allow custom memory allocators
|
||||
#ifndef RL_MALLOC
|
||||
#define RL_MALLOC(sz) malloc(sz)
|
||||
#endif
|
||||
#ifndef RL_CALLOC
|
||||
#define RL_CALLOC(n,sz) calloc(n,sz)
|
||||
#endif
|
||||
#ifndef RL_FREE
|
||||
#define RL_FREE(p) free(p)
|
||||
#endif
|
||||
#else
|
||||
#include "raylib.h" // Required for: Model, Shader, Texture2D, TraceLog()
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue