You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
558 B
34 lines
558 B
|
|
#pragma once |
|
|
|
#include "util.h" |
|
|
|
|
|
// NOTE: wrapper for stb_image |
|
struct util_image |
|
{ |
|
int32 w; |
|
int32 h; |
|
int32 bits_per_channel; |
|
int32 num_channels; |
|
uint data_len; |
|
uint8* pixels; |
|
// FIXME: should use a pointer here, and just add the length of file_path |
|
// onto the allocation for util_image |
|
char file_path[256]; |
|
}; |
|
|
|
struct util_RGBA |
|
{ |
|
real32 R; |
|
real32 G; |
|
real32 B; |
|
real32 A; |
|
}; |
|
|
|
util_image utilLoadImagePath(const char* full_path); |
|
|
|
util_image utilLoadImageBytes(const unsigned char* bytes, uint length); |
|
|
|
void utilFreeImage(util_image image); |
|
|
|
|