
Questions about how to tranfer csgl project to OpenTK project.
Posted Tuesday, 8 June, 2010 - 13:32 by Toanso inHello,every one, i am learning how to animate a character using openGL,i am new and i have a source code about how to export MD2 data into opengl using CSGL,but there is a exception when i build this project using VS2010 and win7 64bit OS,
TypeInitializationException was unhandled in CSGL.oslib.
i can not fix this bug,so i want to rewrite the GL part by OpenTK, but i find the method in CSGL and OpenTk are different, so i have no idear how to do,Can anyone help me.Thanks.
blow is the GL part. if you want the whole project file just write your email,and i will sent it to you.
More Thanks.


Comments
Re: Questions about how to tranfer csgl project to OpenTK ...
Please select your sourcecode and click on the "C#" or "C++" button to enable syntax highlighting, nobody will read it like in notepad. Thx.
Re: Questions about how to tranfer csgl project to OpenTK ...
Hello,every one, i am learning how to animate a character using openGL,i am new and i have a source code about how to export MD2 data into opengl using CSGL,but there is a exception when i build this project using VS2010 and win7 64bit OS,
TypeInitializationException was unhandled in CSGL.oslib.
i can not fix this bug,so i want to rewrite the GL part by OpenTK, but i find the method in CSGL and OpenTk are different, so i have no idear how to do,Can anyone help me.Thanks.
blow is the GL part. if you want the whole project file just write your email,and i will sent it to you.
More Thanks.
Re: Questions about how to tranfer csgl project to OpenTK ...
Please select your sourcecode and click on the "C#" or "C++" button to enable syntax highlighting, nobody will read it like in notepad. Thx.
Sorry,i forgot it.
Re: Questions about how to tranfer csgl project to OpenTK ...
Gosh, CsGL is seriously outdated and buggy. Try this: add a reference to OpenTK.Compatibility and add this at the top of your CsGL source code:
It should be possible to get the code to compile with a little tweaking.
(Historical note: Tao is the direct descendant of CsGL. OpenTK is the direct descendant of Tao.)
Re: Questions about how to tranfer csgl project to OpenTK ...
Gosh, CsGL is seriously outdated and buggy. Try this: add a reference to OpenTK.Compatibility and add this at the top of your CsGL source code:
It should be possible to get the code to compile with a little tweaking.
(Historical note: Tao is the direct descendant of CsGL. OpenTK is the direct descendant of Tao.)
It looks that direct change namespace did not work.such as in tao.Gl there is no method named glFrontFace? Am i right?
Thanks a lot.Regards.
Re: Questions about how to tranfer csgl project to OpenTK ...
http://opentk.svn.sourceforge.net/viewvc/opentk/branches/1.0/Source/Comp...
So that's not it.
Make sure both OpenTK and OpenTK.Compatibility are in your project references.
Re: Questions about how to tranfer csgl project to OpenTK ...
I am wrong , now i find it, another question, if i should change
class OGLView : OpenGLControlTo be
but if i do this
should i change method
To be
but it is public method not virtual or override or abstract, so can not be override.
i am confused by that.
Re: Questions about how to tranfer csgl project to OpenTK ...
I'd suggest using OpenTK.GLControl instead of Tao.Platform.Windows.SimpleOpenGlControl, as the former is better supported. Following your naming conventions, the new code will look similar to this:
There's no InitializeContexts() method, as that is handled automatically behind the scenes. You will probably wish to handle Resize events, too, in order to update your viewport.