Start implementing drawing order
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define WINDOW_H
|
||||
|
||||
#include "aliases.h"
|
||||
#include "mem_arena.h"
|
||||
#include "vector/vec.h"
|
||||
#include <SDL2/SDL_video.h>
|
||||
#include <stdbool.h>
|
||||
@@ -29,13 +30,17 @@ typedef struct {
|
||||
SDL_Window *window;
|
||||
SDL_Surface *front_buffer;
|
||||
SDL_Surface *back_buffer;
|
||||
f32 *z_buffer;
|
||||
} window_t;
|
||||
|
||||
bool init_window(window_t *wnd, u32 width, u32 height, const char *title);
|
||||
bool init_window(Arena *arena, window_t *wnd, u32 width, u32 height,
|
||||
const char *title);
|
||||
void close_window(window_t *wnd);
|
||||
|
||||
void clear_window(window_t *wnd, colour_t colour);
|
||||
void set_pixel(window_t *wnd, i32 x, i32 y, colour_t colour);
|
||||
void set_z_pixel(window_t *wnd, i32 x, i32 y, f32 value);
|
||||
f32 get_z_pixel(const window_t *wnd, i32 x, i32 y);
|
||||
void swap_buffers(window_t *wnd);
|
||||
|
||||
vec3f_t window_to_viewport(const window_t *wnd, i32 x, i32 y, vec3f_t viewport);
|
||||
|
||||
Reference in New Issue
Block a user