Subastra
Loading...
Searching...
No Matches
Static Public Member Functions | Data Fields
image_t Struct Reference

The raw data of an image. More...

#include <image.h>

Collaboration diagram for image_t:
Collaboration graph
[legend]

Static Public Member Functions

static void image_init (image_t *image, allocator_t alloc, const void *buffer, sz size)
 Reinterprets the buffer as the contents of the image file and loads the raw image into memory.
 
static void image_cleanup (image_t *image)
 

Data Fields

allocator_t alloc
 The allocator that's used for the internal raw buffer.
 
byte * raw
 
u32 width
 
u32 height
 
u32 channel
 
GLuint gl
 

Detailed Description

The raw data of an image.

Member Function Documentation

◆ image_cleanup()

static void image_cleanup ( image_t *  image)
static

◆ image_init()

static void image_init ( image_t *  image,
allocator_t  alloc,
const void *  buffer,
sz  size 
)
static

Reinterprets the buffer as the contents of the image file and loads the raw image into memory.

Field Documentation

◆ alloc

allocator_t alloc

The allocator that's used for the internal raw buffer.

◆ channel

u32 channel

◆ gl

GLuint gl

◆ height

u32 height

◆ raw

byte* raw

◆ width

u32 width