winterhell's picture

[solved] Switching windows focus slowdowns with GameWindow

Hi.
When I'm running an application with GameWindow and try to switch to another window I get a couple of seconds OS interface pause before the other window shows. The same thing happens when trying to get back to the GameWindow application, or minimizing/restoring it. It is more apparent when navigating with the taskbar rather than clicking on the actual window(which is impossible if you want Visual Studio/etc to be maximized). Also when starting the application it shows halfway on the taskbar and only after several seconds shows fully.

The problem is there on at least OpenTK 1.0 and 1.1 Beta 3, including the samples themselves.

I'm running Windows 7 64bit, GeForce GTX 650( on 660 Ti its the same), Visual Studio 2010.
Is this fixable?

If not, I'm willing to switch to GLControl, but would that compromise the portability to Linux and OS X?

Thanks.


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
winterhell's picture

Hmm.
When I compiled opentk-2c14ec5f800b8ef6527f05ba26d6c6cca4b417d8, although the lag is fixed, 2 other things happened. No keyboard or mouse input, and resizing the window does not change the size of the rendearable surface.

the Fiddler's picture

This is fixed in the develop branch, please use that instead.

winterhell's picture

I see.
The lag issue is fixed, thanks for that.

However it seems that the hardware acceleration is lost(or something else).
On my game I'm getting 150 fps at 240p and only 5fps at 1440p. For comparison with SDL2 and the old version the framerates are 2150 and 245.

If I have only clear screen and swap buffer the framerates are 7500 and 182 on this, but on SDL2 they are 8200 and 1820.
Also transparency is lost. I'm using fixed function stuff that works on opengl 1.3. Immediate mode, blending, 2D Textures. Power of 2 textures have no effect.

From the Examples Text Rendering draws a white screen and DDS Cube Map crashes.

the Fiddler's picture

That's a separate issue: https://github.com/opentk/opentk/issues/21

Will commit a fix soon.