I'm trying to use glade and opentk, and since 2 nights i try just to make and run the examples of gtkglarea-sharp. I finally successfully did it by adding the the Tao.OpenGl into the GAC via the line :
$gacutil /i Tao.OpenGl.dll /f /package Tao.OpenGl /root /home/gooogle/install/mono-1.2.6/lib/
My stuff lead me to get 2 questions :
First question :
why can't I add OpenTK.dll into the gac ? the result of the gacutil command was :
$gacutil /i OpenTK.dll /f /package opentk-sharp /root /home/gooogle/install/mono-1.2.6/lib/ Failure adding assembly to the cache: Attempt to install an assembly without a strong name. $gacutil /i OpenTK.dll /f /package OpenTK /root /home/gooogle/install/mono-1.2.6/lib/ Failure adding assembly to the cache: Attempt to install an assembly without a strong name. $
Second question :
I try to use OpenTK instead of Tao for the examples of gtkglarea-sharp. So i did it successfully and i could compile the examples with OpenTK instead of Tao, by replacing all the gl.glFunction with GL.Function OpenTK calls.
But i did not work when i execute, with this error :
Exception in Gtk# callback delegate Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception. System.NullReferenceException: Object reference not set to an instance of an object at OpenTK.OpenGL.GL.Viewport (Int32 x, Int32 y, Int32 width, Int32 height) [0x00000] at GtkGL.GLWidget.OnConfigure (System.Object o, System.EventArgs e) [0x0000c] in /home/gooogle/src/gtkglarea-sharp-opentk/examples/util/GLWidget.cs:184 at Gtk.Widget.ConfigureEventSignalCallback (IntPtr arg0, IntPtr arg1, IntPtr gch) [0x00000] at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal) at Gtk.Widget.ConfigureEventSignalCallback(IntPtr arg0, IntPtr arg1, IntPtr gch) at Gtk.Widget.ConfigureEventSignalCallback(IntPtr , IntPtr , IntPtr ) at Gtk.Widget.gtk_widget_show(IntPtr ) at Gtk.Widget.gtk_widget_show(IntPtr ) at Gtk.Widget.Show()
Moreover, when i try to add the action GL.Viewport(0, 0, 20, 20); in a test program, i got exactly the same error above.
So question is : did the init of OpenTK is it different from tao ? and if yes, what could i have to add to have the right comportment ?
Because when i grep the gtkglarea code source, i only found Tao dependancies in the Examples folders, so i suppose the created dll for gtkglarea-sharp is good.
I precise when i added a test code with an GameWindow in the same test program, it's work perfectly, so i don't have problem with dependancies of OpenTK. I think i have my openGl context not initialize. But if it's true, how tao work, without it ?
Thanks for reading me,