diff --git a/src/hexgame.cpp b/src/hexgame.cpp index 83943fc..b7ec46e 100644 --- a/src/hexgame.cpp +++ b/src/hexgame.cpp @@ -560,12 +560,12 @@ int main(int argc, char* argv[]) } #if defined(_WIN32) + LOG(DEBUG) << "TODO: Test SDL_Delay frame timer in win32\n"; + if (!platform_init(handles.window)) { LOG(ERROR) << "Couldn't get SDL platform info, exiting\n"; return 1; } -#else - LOG(DEBUG) << "TODO: Implement better frame timer on linux\n"; // should notice this #endif // main loop diff --git a/src/render_group.cpp b/src/render_group.cpp index 9ed6951..13fda09 100644 --- a/src/render_group.cpp +++ b/src/render_group.cpp @@ -223,6 +223,8 @@ rgDraw(render_group* rg, glm::mat4 model_matrix, glDisableVertexAttribArray(1); if (rg->use_normals) glDisableVertexAttribArray(2); + + glUseProgram(0); } } diff --git a/src/renderer.cpp b/src/renderer.cpp index 48347ed..8f9bc27 100644 --- a/src/renderer.cpp +++ b/src/renderer.cpp @@ -364,6 +364,7 @@ renderFrame(render_state* rs, std::vector *hexes, Entity* entities, ui // get new colors every frame render_group* rg = g_filled_hex_render_group; gl_buffer& color_buf = rg->render_objects[0]->color_buffer; + // TODO: this needs optimization for large grids, very performance intensive fillColorBuffer(color_buf.buffer, color_buf.buffer_len, hexes); rgDraw(rg, m_model, m_view, m_projection, rs->lights, rs->num_lights, false, true);