mirror of
https://github.com/raysan5/raylib.git
synced 2025-10-03 16:36:26 +00:00
REVIEWED: LoadTextureFromImage()
Allow texture loading with no data transfer (in case image.data = NULL)
This commit is contained in:
@@ -2812,7 +2812,7 @@ Texture2D LoadTextureFromImage(Image image)
|
|||||||
{
|
{
|
||||||
Texture2D texture = { 0 };
|
Texture2D texture = { 0 };
|
||||||
|
|
||||||
if ((image.data != NULL) && (image.width != 0) && (image.height != 0))
|
if ((image.width != 0) && (image.height != 0))
|
||||||
{
|
{
|
||||||
texture.id = rlLoadTexture(image.data, image.width, image.height, image.format, image.mipmaps);
|
texture.id = rlLoadTexture(image.data, image.width, image.height, image.format, image.mipmaps);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user