#ifndef _fencer_render_h
#define _fencer_render_h

#include <SDL2/SDL_render.h>
#include <SDL2/SDL_rect.h>
#include "vmath.h"

struct ProgramSettings;

// renderer created from window in Program passed to render_init
extern SDL_Renderer* g_renderer;
// render target
extern SDL_Texture* g_render_target;
// area of window to render render_target to
extern SDL_Rect g_render_area;
// size of render_target
extern IVector g_render_resolution;

extern void render_init(SDL_Window* window, const struct ProgramSettings* settings);
extern void render_clean();
extern void render_present();

extern SDL_FRect render_calculate_unit_rect();
extern void render_calculate_render_area();
extern IVector render_get_window_size();
extern void render_handle_resize();


#endif // !_fencer_render_h
