Shaders management functions.

This commit is contained in:
jussi
2023-10-31 02:11:46 +02:00
parent c3295e014d
commit 65fababd8d
10 changed files with 310 additions and 23 deletions

View File

@@ -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 );
}