mirror of https://github.com/aap/librw.git
opengl mipmap fix
This commit is contained in:
parent
a4df4d8b5d
commit
207c2ee244
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue