From be6d237b9ebbe245de4384c17b84e75dab0f4981 Mon Sep 17 00:00:00 2001 From: Ray Date: Fri, 29 Mar 2019 20:22:50 +0100 Subject: Review models examples --- examples/shaders/shaders_custom_uniform.c | 2 +- examples/shaders/shaders_model_shader.c | 4 ++-- examples/shaders/shaders_postprocessing.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'examples/shaders') diff --git a/examples/shaders/shaders_custom_uniform.c b/examples/shaders/shaders_custom_uniform.c index fbfd82d0..74b9e771 100644 --- a/examples/shaders/shaders_custom_uniform.c +++ b/examples/shaders/shaders_custom_uniform.c @@ -45,7 +45,7 @@ int main() Model model = LoadModel("resources/models/barracks.obj"); // Load OBJ model Texture2D texture = LoadTexture("resources/models/barracks_diffuse.png"); // Load model texture (diffuse map) - model.material.maps[MAP_DIFFUSE].texture = texture; // Set model diffuse texture + model.materials[0].maps[MAP_DIFFUSE].texture = texture; // Set model diffuse texture Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position diff --git a/examples/shaders/shaders_model_shader.c b/examples/shaders/shaders_model_shader.c index 6c64f0ef..2717c192 100644 --- a/examples/shaders/shaders_model_shader.c +++ b/examples/shaders/shaders_model_shader.c @@ -50,8 +50,8 @@ int main() // NOTE: Defining 0 (NULL) for vertex shader forces usage of internal default vertex shader Shader shader = LoadShader(0, FormatText("resources/shaders/glsl%i/grayscale.fs", GLSL_VERSION)); - model.material.shader = shader; // Set shader effect to 3d model - model.material.maps[MAP_DIFFUSE].texture = texture; // Bind texture to model + model.materials[0].shader = shader; // Set shader effect to 3d model + model.materials[0].maps[MAP_DIFFUSE].texture = texture; // Bind texture to model Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position diff --git a/examples/shaders/shaders_postprocessing.c b/examples/shaders/shaders_postprocessing.c index f8483563..7c146419 100644 --- a/examples/shaders/shaders_postprocessing.c +++ b/examples/shaders/shaders_postprocessing.c @@ -74,7 +74,7 @@ int main() Model model = LoadModel("resources/models/church.obj"); // Load OBJ model Texture2D texture = LoadTexture("resources/models/church_diffuse.png"); // Load model texture (diffuse map) - model.material.maps[MAP_DIFFUSE].texture = texture; // Set model diffuse texture + model.materials[0].maps[MAP_DIFFUSE].texture = texture; // Set model diffuse texture Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position -- cgit v1.2.3