automatic detenction of texture mode and batching based on it

This commit is contained in:
2024-07-28 23:59:23 +03:00
parent 945b1d21fe
commit 3edd692771
9 changed files with 89 additions and 30 deletions

View File

@@ -2,6 +2,7 @@
#define TEXTURES_H
#include "private/textures.h"
#include "textures/modes.h"
#include "util.h"
#include <SDL2/SDL.h>
@@ -45,6 +46,9 @@ int32_t textures_get_atlas_id(const struct texture_cache *cache, t_texture_key k
/* binds atlas texture in opengl state */
void textures_bind(const struct texture_cache *cache, t_texture_key key, GLenum target);
/* returns helpful information about contents of alpha channel in given texture */
enum texture_mode textures_get_mode(const struct texture_cache *cache, t_texture_key key);
/* returns the number of atlases in the cache */
size_t textures_get_num_atlases(const struct texture_cache *cache);