diff options
| author | raysan5 <raysan5@gmail.com> | 2016-06-11 12:41:03 +0200 |
|---|---|---|
| committer | raysan5 <raysan5@gmail.com> | 2016-06-11 12:41:03 +0200 |
| commit | 68a02e567d5fea42d1593e7932a0e052cf244d52 (patch) | |
| tree | af319aecde8b8335dcb1a11cc35eebd6fd587228 /src/models.c | |
| parent | c46c0fc6520914d6e9488282c02c96395d8bea9f (diff) | |
| download | raylib-68a02e567d5fea42d1593e7932a0e052cf244d52.tar.gz raylib-68a02e567d5fea42d1593e7932a0e052cf244d52.zip | |
Avoid external variable whiteTexture
To get it, use GetDefaultTexture()
Diffstat (limited to 'src/models.c')
| -rw-r--r-- | src/models.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |
