opengl mipmap fix

This commit is contained in:
aap 2021-02-04 17:34:04 +01:00
parent a4df4d8b5d
commit 207c2ee244

View File

@ -111,7 +111,7 @@ rasterCreateTexture(Raster *raster)
if(raster->format & Raster::MIPMAP){ if(raster->format & Raster::MIPMAP){
int w = raster->width; int w = raster->width;
int h = raster->height; int h = raster->height;
natras->numLevels = 0; natras->numLevels = 1;
while(w != 1 || h != 1){ while(w != 1 || h != 1){
natras->numLevels++; natras->numLevels++;
if(w > 1) w /= 2; if(w > 1) w /= 2;