#pragma once #include #include #include #include #include "../COMMON.h" #define STRING_SDL_IMAGE_LOAD_ERROR "[ERROR] Unable to load image: %s | %s\n" #define STRING_SDL_IMAGE_LOAD_SUCCESS "[INFO] Loaded image: %s\n" typedef struct Texture { GLuint handle; ivec2 size; bool isInit; } Texture; bool texture_from_path_init(Texture* self, const char* path); void texture_init(Texture* self, ivec2 size, void* data); void texture_surface_init(Texture* self, SDL_Surface* surface); void texture_parameter_set(GLenum pname, GLint parameter); void texture_bind(Texture* self); void texture_unbind(void); void texture_free(Texture* self);