2017-04-02 12:55:21 +00:00
|
|
|
#include "filesystem/blob.h"
|
2017-06-19 00:28:15 +00:00
|
|
|
#include "lib/glfw.h"
|
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
|
|
|
|
|
2017-07-22 10:11:43 +00:00
|
|
|
typedef struct {
|
|
|
|
GLenum glInternalFormat;
|
|
|
|
GLenum glFormat;
|
|
|
|
int blockBytes;
|
|
|
|
int compressed;
|
2017-02-19 09:54:58 +00:00
|
|
|
} TextureFormat;
|
|
|
|
|
2017-07-22 10:14:36 +00:00
|
|
|
extern const TextureFormat FORMAT_RGB, FORMAT_RGBA, FORMAT_DXT1, FORMAT_DXT3, FORMAT_DXT5;
|
2017-07-22 10:11:43 +00:00
|
|
|
|
2017-02-19 09:54:58 +00:00
|
|
|
typedef struct {
|
2017-06-19 00:28:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
2017-02-19 09:54:58 +00:00
|
|
|
int width;
|
|
|
|
int height;
|
|
|
|
TextureFormat format;
|
2017-06-19 00:28:15 +00:00
|
|
|
void* data;
|
2017-02-19 09:54:58 +00:00
|
|
|
} 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);
|
2017-04-02 12:55:21 +00:00
|
|
|
TextureData* lovrTextureDataFromBlob(Blob* blob);
|
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);
|