20 lines
529 B
C
20 lines
529 B
C
#ifndef RENDERTARGET_H
|
|
#define RENDERTARGET_H
|
|
|
|
#include "cglm/types-struct.h"
|
|
#include <stdint.h>
|
|
|
|
typedef struct
|
|
{
|
|
vec4s* buffer;
|
|
uint32_t width;
|
|
uint32_t height;
|
|
} render_target_t;
|
|
|
|
render_target_t render_target_create(uint32_t width, uint32_t height);
|
|
vec4s render_target_get_pixel(render_target_t* render_target, uint32_t x, uint32_t y);
|
|
void render_target_set_pixel(render_target_t* render_target, uint32_t x, uint32_t y, vec4s color);
|
|
void render_target_free(render_target_t* target);
|
|
|
|
#endif // RENDERTARGET_H
|