aboutsummaryrefslogtreecommitdiffstats
path: root/src/assets.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/assets.c')
-rw-r--r--src/assets.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/assets.c b/src/assets.c
index 1da7197..4072988 100644
--- a/src/assets.c
+++ b/src/assets.c
@@ -21,6 +21,18 @@ const char modelAssetPaths[MODEL_ASSET_COUNT][FT_NAMEMAX] = {
"UtilityPole.obj"
};
+void initShaderAssets(Shader shaders[SHADER_ASSET_COUNT])
+{
+ // Skybox.
+ Shader shader = shaders[SKYBOX_SHADER];
+ SetShaderValue(shader, GetShaderLocation(shader, "environmentMap"),
+ (int[1]){ MATERIAL_MAP_CUBEMAP }, SHADER_UNIFORM_INT);
+
+ // Instancing.
+ shader = shaders[INSTANCING_SHADER];
+ shader.locs[SHADER_LOC_MATRIX_MVP] = GetShaderLocation(shader, "mvp");
+}
+
void initAssets(Assets* assets)
{
// Textures.
@@ -47,6 +59,8 @@ void initAssets(Assets* assets)
shaderAssetNames[index]));
}
+ initShaderAssets(assets->shaders);
+
// Models.
for (int index = 0; index < MODEL_ASSET_COUNT; ++index)
{