浏览代码

Corrected bug on web

Ray San 10 年之前
父节点
当前提交
fb4105cf8a
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/textures.c

+ 3 - 3
src/textures.c

@@ -1160,11 +1160,11 @@ void ImageColorBrightness(Image *image, int brightness)
 void GenTextureMipmaps(Texture2D texture)
 {
 #if PLATFORM_WEB
-    int potWidth = GetNextPOT(image->width);
-    int potHeight = GetNextPOT(image->height);
+    int potWidth = GetNextPOT(texture.width);
+    int potHeight = GetNextPOT(texture.height);
 
     // Check if texture is POT
-    if ((potWidth != image->width) || (potHeight != image->height))
+    if ((potWidth != texture.width) || (potHeight != texture.height))
     {
         TraceLog(WARNING, "Limited NPOT support, no mipmaps available for NPOT textures");
     }