Hey there,
for some reason the SFML.Graphics.RenderWindow constructors behave very inconsistenlty on different setups.
If I run the attached program on my laptop, it only takes about 100 ms to create the window, however on my main machine the constructor doesn't return for about 2.4 seconds.
Both devices run the same build of Windows 10 Professional 64 bit, for more specs see below.
Other users have reported different times between 300 and 3000 ms.
The delay is consistent for each individual setup. E.g. my main machine always takes around 2400 ms.
I'm using SFML.NET 2.2 on top of CSFML 2.4 (also tried 2.2/2.2 and the NuGet configuration).
The problem occurs with both 32 and 64 bit, Debug and Release builds.
- Mario
static void Main
() { var sw
= new Stopwatch
(); sw
.Start(); RenderWindow wind
= new RenderWindow
(new VideoMode
(800,
600,
32),
"Test"); sw
.Stop(); Console
.WriteLine($
"Time to create window: {sw.Elapsed.Seconds}.{sw.Elapsed.Milliseconds:D3} seconds"); wind
.Closed += (s, e
) => wind
.Close(); while(wind
.IsOpen) { wind
.DispatchEvents(); wind
.Clear(); wind
.Display(); }} Specs:Laptop (~100 ms):Microsoft Surface Book
Windows 10 Professional 64 bit (version 1703)
Intel Code i7 6600U (2.60 GHz)
8 GB memory
Intel HD Graphics 520 + Unspecified NVIDIA GPU
PC (~2400 ms):Windows 10 Professional 64 bit (version 1703)
Intel Core i7-3820 (3.6 GHz)
32 GB memory
NVIDIA GeForce GTX 970 2-way SLI + multiple screens (maybe that's an issue?)