#pragma once #include #if defined (_WIN32) #include #else #include #endif #include #include "camera.h" #include "entity.h" #include "hexgrid.h" #include "util.h" struct SDL_Handles { SDL_Window *window; SDL_GLContext glContext; SDL_DisplayMode currentDisplayMode; std::vector texSurfaces; }; struct render_state { v2i viewport_dims; bool is_debug_draw; uint32 fill_color; uint32 selected_fill_color; }; struct renPointLight { glm::vec3 position; glm::vec3 direction; glm::vec3 color; float intensity; uint light_ID; }; bool initRenderer(SDL_Handles &handles, v2i vpDims); bool addTexture(SDL_Handles &handles, const char * path); camera& renGetCamera(); v2f getUnprojectedCoords(int32 x, int32 y, int32 vp_width, int32 vp_height); v3f getCameraPosition(); bool createScene(std::vector* hexes, Entity* entities, uint32 entity_count); void moveCamera(bool up, bool left, bool down, bool right, bool forward, bool backward); void rollCamera(bool CW, bool CCW); void rotateCamera(int32 xrel, int32 yrel); void renderFrame(std::vector *hexes, Entity* entities, uint32 entity_count); void renderDebug(std::vector &vertices); void freeBuffers();