diff options
| author | raysan5 <[email protected]> | 2017-07-21 17:17:37 +0200 |
|---|---|---|
| committer | raysan5 <[email protected]> | 2017-07-21 17:17:37 +0200 |
| commit | 9040526f175ac6e19551fa72e2dc25790be9f818 (patch) | |
| tree | 891683ce3793d32a9d4d4e4ac84da68675023f87 /examples/shaders | |
| parent | 38d9fcb08ef81cd5a3ab93df825eac7714d03e45 (diff) | |
| download | raylib-9040526f175ac6e19551fa72e2dc25790be9f818.tar.gz raylib-9040526f175ac6e19551fa72e2dc25790be9f818.zip | |
Adapt to new materials system
Diffstat (limited to 'examples/shaders')
| -rw-r--r-- | examples/shaders/shaders_custom_uniform.c | 2 | ||||
| -rw-r--r-- | examples/shaders/shaders_model_shader.c | 4 | ||||
| -rw-r--r-- | examples/shaders/shaders_postprocessing.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/examples/shaders/shaders_custom_uniform.c b/examples/shaders/shaders_custom_uniform.c index 89f87df9..a0f6fd22 100644 --- a/examples/shaders/shaders_custom_uniform.c +++ b/examples/shaders/shaders_custom_uniform.c @@ -34,7 +34,7 @@ int main() Model dwarf = LoadModel("resources/model/dwarf.obj"); // Load OBJ model Texture2D texture = LoadTexture("resources/model/dwarf_diffuse.png"); // Load model texture (diffuse map) - dwarf.material.texDiffuse = texture; // Set dwarf model diffuse texture + dwarf.material.maps[MAP_DIFFUSE].texture = texture; // Set dwarf 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 ef5665d2..f1a349c6 100644 --- a/examples/shaders/shaders_model_shader.c +++ b/examples/shaders/shaders_model_shader.c @@ -37,8 +37,8 @@ int main() Shader shader = LoadShader("resources/shaders/glsl330/base.vs", "resources/shaders/glsl330/grayscale.fs"); // Load model shader - dwarf.material.shader = shader; // Set shader effect to 3d model - dwarf.material.maps[TEXMAP_DIFFUSE].tex = texture; // Bind texture to model + dwarf.material.shader = shader; // Set shader effect to 3d model + dwarf.material.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 bb239efa..ae77a723 100644 --- a/examples/shaders/shaders_postprocessing.c +++ b/examples/shaders/shaders_postprocessing.c @@ -76,7 +76,7 @@ int main() Model dwarf = LoadModel("resources/model/dwarf.obj"); // Load OBJ model Texture2D texture = LoadTexture("resources/model/dwarf_diffuse.png"); // Load model texture (diffuse map) - dwarf.material.texDiffuse = texture; // Set dwarf model diffuse texture + dwarf.material.maps[MAP_DIFFUSE].texture = texture; // Set dwarf model diffuse texture Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position |
