diff options
| author | jussi | 2023-10-31 02:11:46 +0200 |
|---|---|---|
| committer | jussi | 2023-10-31 02:11:46 +0200 |
| commit | 65fababd8d36b47c85e7d6b43f649ed88c7e8bcf (patch) | |
| tree | 97c36c1a507033e96594ef4aea3ac161b0499c06 /src/state.c | |
| parent | c3295e014d979c0213b3fb7e4837b5356bc8fdb4 (diff) | |
| download | reilua-enhanced-65fababd8d36b47c85e7d6b43f649ed88c7e8bcf.tar.gz reilua-enhanced-65fababd8d36b47c85e7d6b43f649ed88c7e8bcf.tar.bz2 reilua-enhanced-65fababd8d36b47c85e7d6b43f649ed88c7e8bcf.zip | |
Shaders management functions.
Diffstat (limited to 'src/state.c')
| -rw-r--r-- | src/state.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/state.c b/src/state.c index b96b557..228cbce 100644 --- a/src/state.c +++ b/src/state.c @@ -36,6 +36,12 @@ bool stateInit( int argn, const char **argc, const char *exePath ) { } state->defaultFont = GetFontDefault(); state->defaultMaterial = LoadMaterialDefault(); + state->RLGLcurrentShaderLocs = malloc( RL_MAX_SHADER_LOCATIONS * sizeof( int ) ); + int *defaultShaderLocs = rlGetShaderLocsDefault(); + + for ( int i = 0; i < RL_MAX_SHADER_LOCATIONS; i++ ) { + state->RLGLcurrentShaderLocs[i] = defaultShaderLocs[i]; + } return state->run; } @@ -57,5 +63,6 @@ void stateFree() { CloseWindow(); } free( state->exePath ); + free( state->RLGLcurrentShaderLocs ); free( state ); } |
