cameronking wrote on Monday, July 05, 2010:
I have recently noticed what may be a bug, or perhaps I’m doing something
wrong.
* Setup a window, title and window size.
* Load a “loading” texture.
* GLFW buffer swap (My window should be set-up by now and this swap should
be displaying my “loading” texture, but it isn’t!)
* Load all other images now.
* GLFW sleep for 2 seconds (only when 2 seconds expire and buffer swap
called after does the title and canvas show update!)
* Removes “loading” texture
* GLFW buffer swaps in loop for main menu. (Suddenly the canvas updates and
the window is given the requested title!)
…
I find that by the point of “sleep for 2 seconds”, the window is still
displaying the stock “GLFW Window”, title and the canvas is black. -Only when
the 2 second (or 10 second or whatever delay you like) has passed does the
GLFW set-up the display and show the “loading” texture.
The reason I find this weird is that immediately I set-up a window and load a
texture, I call GLFW buffer swap. So I’m expecting to see the canvas loaded
with that image.
Why is GLFW sleep delaying the set-up of the window and the canvas??
Thanks for any help,
Cameron