Removed function SetModelTexture()
It's more educational to go through new material system, so, I decide to remove this function to avoid students confusion...
This commit is contained in:
parent
b358402cb3
commit
5f7ac64c44
9 changed files with 11 additions and 18 deletions
|
@ -29,7 +29,7 @@ int main()
|
|||
|
||||
// NOTE: By default each cube is mapped to one part of texture atlas
|
||||
Texture2D texture = LoadTexture("resources/cubicmap_atlas.png"); // Load map texture
|
||||
SetModelTexture(&map, texture); // Bind texture to map model
|
||||
map.material.texDiffuse = texture; // Set map diffuse texture
|
||||
|
||||
Vector3 mapPosition = { -16.0f, 0.0f, -8.0f }; // Set model position
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ int main()
|
|||
Image image = LoadImage("resources/heightmap.png"); // Load heightmap image (RAM)
|
||||
Texture2D texture = LoadTextureFromImage(image); // Convert image to texture (VRAM)
|
||||
Model map = LoadHeightmap(image, (Vector3){ 16, 8, 16 }); // Load heightmap model with defined size
|
||||
SetModelTexture(&map, texture); // Bind texture to model
|
||||
map.material.texDiffuse = texture; // Set map diffuse texture
|
||||
Vector3 mapPosition = { -8.0f, 0.0f, -8.0f }; // Set model position (depends on model scaling!)
|
||||
|
||||
UnloadImage(image); // Unload heightmap image from RAM, already uploaded to VRAM
|
||||
|
|
|
@ -25,7 +25,7 @@ int main()
|
|||
|
||||
Model dwarf = LoadModel("resources/model/dwarf.obj"); // Load OBJ model
|
||||
Texture2D texture = LoadTexture("resources/model/dwarf_diffuse.png"); // Load model texture
|
||||
SetModelTexture(&dwarf, texture); // Bind texture to model
|
||||
dwarf.material.texDiffuse = texture; // Set dwarf model diffuse texture
|
||||
Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
|
|
|
@ -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)
|
||||
SetModelTexture(&dwarf, texture); // Bind texture to model
|
||||
dwarf.material.texDiffuse = texture; // Set dwarf model diffuse texture
|
||||
|
||||
Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position
|
||||
|
||||
|
|
|
@ -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)
|
||||
SetModelTexture(&dwarf, texture); // Bind texture to model
|
||||
dwarf.material.texDiffuse = texture; // Set dwarf model diffuse texture
|
||||
|
||||
Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue