Adapt to new materials system

This commit is contained in:
raysan5 2017-07-21 17:17:37 +02:00
parent 38d9fcb08e
commit 9040526f17
6 changed files with 7 additions and 7 deletions

View file

@ -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

View file

@ -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

View file

@ -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