Avoid external variable whiteTexture

To get it, use GetDefaultTexture()
This commit is contained in:
raysan5 2016-06-11 12:41:03 +02:00
parent c46c0fc652
commit 68a02e567d
3 changed files with 6 additions and 7 deletions

View file

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