Adapt to new materials system
This commit is contained in:
parent
38d9fcb08e
commit
9040526f17
@ -35,7 +35,7 @@ int main()
|
||||
|
||||
Model tower = LoadModel("resources/tower.obj"); // Load OBJ model
|
||||
Texture2D texture = LoadTexture("resources/tower.png"); // Load model texture
|
||||
tower.material.texDiffuse = texture; // Set model diffuse texture
|
||||
tower.material.maps[MAP_DIFFUSE].texture = texture; // Set model diffuse texture
|
||||
|
||||
Vector3 towerPos = { 0.0f, 0.0f, 0.0f }; // Set model position
|
||||
BoundingBox towerBBox = CalculateBoundingBox(tower.mesh);
|
||||
|
@ -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
|
||||
dwarf.material.texDiffuse = texture; // Set dwarf model diffuse texture
|
||||
dwarf.material.maps[MAP_DIFFUSE].texture = texture; // Set map 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
|
||||
|
@ -35,7 +35,7 @@ int main()
|
||||
|
||||
// Load cubemap shader and setup required shader locations
|
||||
Shader shdrCubemap = LoadShader("resources/shaders/cubemap.vs", "resources/shaders/cubemap.fs");
|
||||
SetShaderValuei(shdrCubemap, GetShaderLocation(shdrCubemap, "environmentMap"), (int[1]){ 0 }, 1);
|
||||
SetShaderValuei(shdrCubemap, GetShaderLocation(shdrCubemap, "equirectangularMap"), (int[1]){ 0 }, 1);
|
||||
|
||||
Texture2D texHDR = LoadTexture("resources/pinetree.hdr");
|
||||
skybox.material.maps[MAP_CUBEMAP].texture = GenTextureCubemap(shdrCubemap, texHDR, 512);
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user