summaryrefslogtreecommitdiffhomepage
path: root/src/textures.c
diff options
context:
space:
mode:
authorRay <[email protected]>2016-11-22 12:14:55 +0100
committerRay <[email protected]>2016-11-22 12:14:55 +0100
commitf1bcfc1352f73b9da98601f6b67cd15853b1cb8f (patch)
treef0a429afb3ad419177e947ee5873a67571a2e077 /src/textures.c
parentd1c9c34b2f374c010d3e2c4b54378b830fbc3f21 (diff)
downloadraylib-f1bcfc1352f73b9da98601f6b67cd15853b1cb8f.tar.gz
raylib-f1bcfc1352f73b9da98601f6b67cd15853b1cb8f.zip
Corrected bug on GenTextureMipmaps()
texture.mipmaps value needs to be updated, so, texture must be passed by reference instead of by value
Diffstat (limited to 'src/textures.c')
-rw-r--r--src/textures.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/textures.c b/src/textures.c
index af59d035..126adad3 100644
--- a/src/textures.c
+++ b/src/textures.c
@@ -1516,14 +1516,14 @@ void ImageColorBrightness(Image *image, int brightness)
}
// Generate GPU mipmaps for a texture
-void GenTextureMipmaps(Texture2D texture)
+void GenTextureMipmaps(Texture2D *texture)
{
#if PLATFORM_WEB
- int potWidth = GetNextPOT(texture.width);
- int potHeight = GetNextPOT(texture.height);
+ int potWidth = GetNextPOT(texture->width);
+ int potHeight = GetNextPOT(texture->height);
// Check if texture is POT
- if ((potWidth != texture.width) || (potHeight != texture.height))
+ if ((potWidth != texture->width) || (potHeight != texture->height))
{
TraceLog(WARNING, "Limited NPOT support, no mipmaps available for NPOT textures");
}