1
0
Fork 0
mirror of https://github.com/bjornbytes/lovr.git synced 2024-07-03 13:03:38 +00:00
lovr/src/loaders/texture.h

25 lines
625 B
C
Raw Normal View History

2017-01-09 05:29:16 +00:00
#include <stdint.h>
2016-11-26 07:54:45 +00:00
2017-02-19 09:54:58 +00:00
#pragma once
typedef enum {
FORMAT_RED,
FORMAT_RG,
FORMAT_RGB,
FORMAT_RGBA
} TextureFormat;
typedef struct {
void* data;
int width;
int height;
int channels;
TextureFormat format;
} TextureData;
2017-02-03 23:16:30 +00:00
TextureData* lovrTextureDataGetBlank(int width, int height, uint8_t value, TextureFormat format);
2017-02-06 04:30:17 +00:00
TextureData* lovrTextureDataGetEmpty(int width, int height, TextureFormat format);
2016-11-26 07:54:45 +00:00
TextureData* lovrTextureDataFromFile(void* data, int size);
2017-02-06 04:30:17 +00:00
void lovrTextureDataResize(TextureData* textureData, int width, int height, uint8_t value);
2017-02-19 09:54:58 +00:00
void lovrTextureDataDestroy(TextureData* textureData);