24 lines
598 B
C
24 lines
598 B
C
#ifndef TWN_GPU_TEXTURE_C_H
|
|
#define TWN_GPU_TEXTURE_C_H
|
|
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
|
|
typedef uint32_t GPUTexture;
|
|
|
|
typedef enum TextureFilter {
|
|
TEXTURE_FILTER_NEAREAST,
|
|
TEXTURE_FILTER_LINEAR,
|
|
} TextureFilter;
|
|
|
|
/* allocate a texture storage with constant parameters */
|
|
GPUTexture create_gpu_texture(TextureFilter filter, bool generate_mipmaps, int channels, int width, int height);
|
|
|
|
void delete_gpu_texture(GPUTexture texture);
|
|
|
|
void upload_gpu_texture(GPUTexture texture, void *pixels, int channels, int width, int height);
|
|
|
|
void bind_gpu_texture(GPUTexture texture);
|
|
|
|
#endif
|