mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-13 23:08:14 +00:00
Avoid external variable whiteTexture
To get it, use GetDefaultTexture()
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user