add texture border to atlas residents, actually make use of mipmapping
This commit is contained in:
@ -340,7 +340,7 @@ void finish_index_builder(IndexBufferBuilder *builder) {
|
||||
|
||||
|
||||
static void load_cubemap_side(const char *path, GLenum target) {
|
||||
SDL_Surface *surface = textures_load_surface(path);
|
||||
SDL_Surface *surface = textures_load_surface(path, false);
|
||||
/* TODO: sanity check whether all of them have same dimensions? */
|
||||
glTexImage2D(target,
|
||||
0,
|
||||
@ -350,6 +350,7 @@ static void load_cubemap_side(const char *path, GLenum target) {
|
||||
surface->format->BytesPerPixel == 4 ? GL_RGBA : GL_RGB,
|
||||
GL_UNSIGNED_BYTE,
|
||||
surface->pixels);
|
||||
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
|
Reference in New Issue
Block a user