#pragma once #if defined (_WIN32) #include #else #include #endif #include #include #include "camera.h" #include "entity.h" #include "util.h" #include "shader_program.h" struct SDL_Handles { SDL_Window *window; SDL_GLContext glContext; SDL_DisplayMode currentDisplayMode; }; struct point_light { uint light_ID; glm::vec3 position; glm::vec3 color; float intensity; }; // NOTE: array of entities rendered with the same shader program struct render_group { entity* entities; uint entity_count; shader_program shader; }; struct render_state { glm::vec2 viewport_dims; bool is_debug_draw; SDL_Handles handles; camera cam; util_RGBA clear_col; render_group** render_groups; uint render_group_count; shader_program* default_shader; point_light* lights; uint num_lights; uint max_lights; }; render_state* renInit(const char* title = "Tangerine", glm::vec2 viewport_dims = glm::vec2(1280, 720)); void renShutdown(render_state* rs); render_group* renAllocateGroup(uint entity_count, shader_program shader); void renRenderFrame(render_state* rs);