2024-09-16 13:17:00 +00:00
|
|
|
#ifndef TWN_GPU_TEXTURE_C_H
|
|
|
|
#define TWN_GPU_TEXTURE_C_H
|
2024-09-16 06:07:01 +00:00
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
2024-09-23 17:43:16 +00:00
|
|
|
typedef GLuint GPUTexture;
|
2024-09-16 06:07:01 +00:00
|
|
|
|
2024-09-23 17:43:16 +00:00
|
|
|
typedef enum TextureFilter {
|
2024-09-16 06:07:01 +00:00
|
|
|
TEXTURE_FILTER_NEAREAST,
|
|
|
|
TEXTURE_FILTER_LINEAR,
|
2024-09-23 17:43:16 +00:00
|
|
|
} TextureFilter;
|
2024-09-16 06:07:01 +00:00
|
|
|
|
2024-09-23 17:43:16 +00:00
|
|
|
GPUTexture create_gpu_texture(TextureFilter filter, bool generate_mipmaps);
|
2024-09-16 06:07:01 +00:00
|
|
|
|
2024-09-23 17:43:16 +00:00
|
|
|
void delete_gpu_texture(GPUTexture texture);
|
2024-09-16 06:07:01 +00:00
|
|
|
|
2024-09-23 17:43:16 +00:00
|
|
|
void upload_gpu_texture(GPUTexture texture, void *pixels, int channels, int width, int height);
|
2024-09-16 06:07:01 +00:00
|
|
|
|
2024-09-23 17:43:16 +00:00
|
|
|
void bind_gpu_texture(GPUTexture texture);
|
2024-09-16 06:07:01 +00:00
|
|
|
|
|
|
|
#endif
|