diff --git a/src/fbo.c b/src/fbo.c index 0066cd75..5abef83d 100644 --- a/src/fbo.c +++ b/src/fbo.c @@ -17,8 +17,8 @@ static void init_fbo(FBO *fbo, float scale, int type) { glBindTexture(GL_TEXTURE_2D, fbo->tex); fbo->scale = scale = sanitize_scale(scale); - fbo->nw = topow2(scale * VIEWPORT_W); - fbo->nh = topow2(scale * VIEWPORT_H); + fbo->nw = scale * VIEWPORT_W; + fbo->nh = scale * VIEWPORT_H; log_debug("FBO %p: q=%f, w=%i, h=%i", (void*)fbo, fbo->scale, fbo->nw, fbo->nh); diff --git a/src/resource/texture.c b/src/resource/texture.c index d969ebb4..bebb572c 100644 --- a/src/resource/texture.c +++ b/src/resource/texture.c @@ -256,11 +256,8 @@ void load_sdl_surf(SDL_Surface *surface, Texture *texture) { glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - int nw = 2; - int nh = 2; - - while(nw < surface->w) nw *= 2; - while(nh < surface->h) nh *= 2; + int nw = surface->w; + int nh = surface->h; uint32_t *tex = calloc(sizeof(uint32_t), nw*nh); uint32_t clr;