Hello all. I’m trying to have a quick menu animation the first time my game is booted up, however I’m running into some timing problems.
What I am doing (in windows) is creating a window with CreateWindowEx and when WM_CREATE is called I do the SetPixelFormat and other opengl setup. There is a thread created that handles all animation calculations, while the existing thread contains my drawing loop.
The problem I’m running into is that by the time the actual window is visible the intro animation has already completed. What seems to be happening is both the thread for animating and the opengl draw loop are running while windows before anything is visible to the user. I tried holding off on looping or running the second thread until WM_CREATE is called, but that seems to be called way before the window can be seen.
So my question is. Does anyone know of some type of listener or a variable that can be checked to see if the opengl screen is actually showing to the user, so I can wait until there to do my animation?