Only show window when it's ready.

This commit is contained in:
Bartosz Taudul 2018-08-31 19:40:08 +02:00
parent a9dd70251b
commit 00fb98ed64

View File

@ -93,6 +93,7 @@ int main( int argc, char** argv )
// Setup window // Setup window
glfwSetErrorCallback(glfw_error_callback); glfwSetErrorCallback(glfw_error_callback);
if( !glfwInit() ) return 1; if( !glfwInit() ) return 1;
glfwWindowHint(GLFW_VISIBLE, 0);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
@ -163,6 +164,8 @@ int main( int argc, char** argv )
std::thread loadThread; std::thread loadThread;
glfwShowWindow( window );
// Main loop // Main loop
while (!glfwWindowShouldClose(window)) while (!glfwWindowShouldClose(window))
{ {