CXO2's picture

Cannot Set Icon of Window in Ubuntu

Hi All, I am writing the game in C# with OpenTK.
And now the game was running perfectly in Windows.

But I have little problem, I am copying my sources project into Linux, and try to open it with MonoDevelop, it always give me an error.
The error line pointing when I am Set the Icon of Window this.Icon = MyNameSpace.Properties.Resource.MainIcon

When I trace it, the error come from OpenTK\Platform\X11\X11GLNative.cs at INativeWindow Members -> Icon Properties, it hit the exception at line 1019 when the convert process between Icon and Bitmap System.Drawing.Bitmap bitmap = value.ToBitmap();

Is this OpenTK bug? or what?
Can someone fix this?



Comment viewing options

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

What's the exception? Something about the GDI Drawing stuff missing? That might just not be available on the linux platform.

Was it this?

I think much of OpenTK hasn't been tested on Linux. I don't really know. I had issues with similar calls on OS X, but I don't recall ever finding a solution.