rendering.c: fix sprite uv in batches, fix alpha blending of texture atlas
This commit is contained in:
@@ -75,6 +75,7 @@ static void add_new_atlas(struct texture_cache *cache) {
|
||||
a_mask);
|
||||
SDL_FreeFormat(native_format);
|
||||
|
||||
SDL_SetSurfaceBlendMode(new_atlas, SDL_BLENDMODE_NONE);
|
||||
SDL_SetSurfaceRLE(new_atlas, true);
|
||||
arrput(cache->atlas_surfaces, new_atlas);
|
||||
arrput(cache->atlas_textures, new_gl_texture());
|
||||
@@ -108,7 +109,7 @@ static void upload_texture_from_surface(GLuint texture, SDL_Surface *surface) {
|
||||
|
||||
glTexImage2D(GL_TEXTURE_2D,
|
||||
0,
|
||||
GL_RGBA,
|
||||
GL_RGBA8,
|
||||
surface->w,
|
||||
surface->h,
|
||||
0,
|
||||
|
Reference in New Issue
Block a user