Skip to content

Weird fonts/menus with GLControl, Winforms #11

Closed
shorowit opened this Issue Dec 2, 2013 · 7 comments

2 participants

@shorowit
shorowit commented Dec 2, 2013

I have had a couple users experience strange fonts and menu positioning in our WinForms application, which uses the beta1 release of OpenTK's GLControl. I was really surprised to see that, while the control appears in only one area of our application, the fonts/menus affected are outside the control. How is this even possible?

I have uploaded a user's screenshots of the bad behavior:
http://i.imgur.com/VCkfixH.png
and the good behavior:
http://i.imgur.com/hHeBJFX.png

One user has a Dell Alienware laptop with Windows 7 64-bit, and another user is using the latest version of Parallels Desktop on Mac Mavericks OSX.

We verified that the previous OpenTK nightly build (2012-03-15) worked correctly for the latter user (I'm awaiting a response from the former user).

What other information can I provide?

Thanks,
Scott

@shorowit
shorowit commented Dec 2, 2013

The second user has now confirmed that the 2012-03-15 build fixes the problem for them.

I have requested graphics card/driver information from the users.

@shorowit
shorowit commented Dec 2, 2013

Also, note that I am not using the SDL backend. (The Readme.txt file says that SDL "does not support OpenTK.GLControl (fix in progress)".)

@thefiddler
@thefiddler

Starting with 1475b3d4, you can indicate that your application is not DPI-aware with the following snippet:

public static void Main()
{
    using (OpenTK.Toolkit.Init(
        new OpenTK.ToolkitOptions
        {
            EnableHighResolution = false
        }));
    {
        // your code here, e.g.
        // Application.Run(new Form1());
        // ...
    }
}

Edit: as of SDL 2.0.1, it is not possible to initialize SDL on foreign windows (e.g. WinForms). This is a known issue, I am working with upstream to implement this functionality.

@shorowit
shorowit commented Dec 2, 2013

Thanks for the quick response!

I'm using the "Enable application framework" setting for my vb.net project, so I don't have a Application.Run() call. And I'm too worried about causing a bug by disabling the framework. Is there an alternative way to set this option?

@thefiddler
@shorowit
shorowit commented Dec 3, 2013

Thanks! I got confirmation that this worked for one user.

@shorowit shorowit closed this Dec 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.