From 3e8427799c27b1e0bca22759ae434e23b06547ae Mon Sep 17 00:00:00 2001 From: raysan5 Date: Sat, 11 Jun 2016 10:56:20 +0200 Subject: Corrected bug on cubemap generation --- src/models.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/models.c') diff --git a/src/models.c b/src/models.c index 15565c98..8d9219e3 100644 --- a/src/models.c +++ b/src/models.c @@ -739,7 +739,7 @@ Model LoadCubicmap(Image cubicmap) { Model model = { 0 }; - model.mesh = GenMeshCubicmap(cubicmap, (Vector3){ 1.0, 1.0, 1.5f }); + model.mesh = GenMeshCubicmap(cubicmap, (Vector3){ 1.0f, 1.5f, 1.0f }); rlglLoadMesh(&model.mesh, false); // Upload vertex data to GPU (static model) -- cgit v1.2.3 From 68a02e567d5fea42d1593e7932a0e052cf244d52 Mon Sep 17 00:00:00 2001 From: raysan5 Date: Sat, 11 Jun 2016 12:41:03 +0200 Subject: Avoid external variable whiteTexture To get it, use GetDefaultTexture() --- src/models.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/models.c') diff --git a/src/models.c b/src/models.c index 8d9219e3..8deabcb0 100644 --- a/src/models.c +++ b/src/models.c @@ -50,7 +50,7 @@ //---------------------------------------------------------------------------------- // Global Variables Definition //---------------------------------------------------------------------------------- -extern unsigned int whiteTexture; +// ... //---------------------------------------------------------------------------------- // Module specific Functions Declaration @@ -811,7 +811,7 @@ void UnloadMaterial(Material material) // Link a texture to a model void SetModelTexture(Model *model, Texture2D texture) { - if (texture.id <= 0) model->material.texDiffuse.id = whiteTexture; // Use default white texture + if (texture.id <= 0) model->material.texDiffuse = GetDefaultTexture(); // Use default white texture else model->material.texDiffuse = texture; } -- cgit v1.2.3