luca-piccioni / OpenGL.Net

Modern OpenGL bindings for C#.
MIT License
568 stars 108 forks source link

You have to forget SizeAllocated of HelloWorld.Gtk3 #87

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hello my dear!

I find OpenGL.Net because it works fine with Gtk3. Congratulation!

OpenTK 2.x 3.x doesn't work if it crashed or stopped to run.

I have add lines glWidget.SizeAllocated += GlWidget_SizeAllocate;

And new method:

        private void GlWidget_SizeAllocate(object o, SizeAllocatedArgs args)
        {
            Gl.Viewport(0, 0, args.Allocation.Width, args.Allocation.Height);
        }

Try resize window and it looks correct.

I hope you have to know "SizeAllocated" eventhandler SizeAllocate is resize because Gtk3 Sharp looks great and works fine with OpenGL 4.5 Thanks your library helped me good.

That is why OpenTK is dead and Welcome and stay alive with OpenGL.net

I want tell you about how did I wwith runtime of Gtk3? From Msys2 ( Pacman ) I have add line in static void Main() For 32 Bit: Environment.CurrentDirectory = System.IO.Path.Combine(System.IO.Path.Combine(System.IO.Path.Combine("C:\\msys64"), "mingw32"), "bin");

For 64 Bit: Environment.CurrentDirectory = System.IO.Path.Combine(System.IO.Path.Combine(System.IO.Path.Combine("C:\\msys64"), "mingw64"), "bin");

Or you need more information http://grbd.github.io/posts/2016/01/29/gtksharp-part-2-setting-up-glade/ ( This will explain about important themes and icons copy from msys2 to C:\ProgramData if you are use Windows 10 Pro 64 Bit than you copy from C:\Msys2\mingw64 or 32 Bit for mingw32 and past to C:\ProgramData\

Thanks!