Redraw window contents during resize.

This commit is contained in:
Bartosz Taudul 2020-01-10 02:10:28 +01:00
parent 5f48b08215
commit 727ac634a9

View File

@ -77,6 +77,10 @@ static void SetWindowTitleCallback( const char* title )
} }
static void DrawContents(); static void DrawContents();
static void WindowRefreshCallback( GLFWwindow* window )
{
DrawContents();
}
std::vector<std::unordered_map<std::string, uint64_t>::const_iterator> RebuildConnectionHistory( const std::unordered_map<std::string, uint64_t>& connHistMap ) std::vector<std::unordered_map<std::string, uint64_t>::const_iterator> RebuildConnectionHistory( const std::unordered_map<std::string, uint64_t>& connHistMap )
{ {
@ -235,6 +239,7 @@ int main( int argc, char** argv )
glfwMakeContextCurrent(window); glfwMakeContextCurrent(window);
glfwSwapInterval(1); // Enable vsync glfwSwapInterval(1); // Enable vsync
gl3wInit(); gl3wInit();
glfwSetWindowRefreshCallback( window, WindowRefreshCallback );
#ifdef _WIN32 #ifdef _WIN32
typedef UINT(*GDFS)(void); typedef UINT(*GDFS)(void);