[.net] OpenGL in C#?

Started by
7 comments, last by nagromo 19 years, 5 months ago
is there a support for OpenGL in C#.. Or we just create our own wrapper to wrap openGL functions and import opengl.dll in our C# applications? IS ther no plan for the OpenGL creators to create OGL in C#? thanks
Advertisement
Microsoft's focus so far has been DirectX, but I believe there are several managed wrappers for OpenGL out there. I don't know the names or links of any off hand, but go ahead and Google for "C# opengl" or "managed opengl" or something similar. Someone else here will probably know more than I do, and should be able to help you out a bit more. Good luck.
Your best bet is the tau framework. According to their website they have it working on Windows and Linux which is quite cool... I'm currently working on a cross platform .NET engine and it looks the way to go...

Hope that helps!
It's the Tao framework, which includes Tao.OpenGL, Tao.OpenAL, Tao.DevIL, Tao.Sdl, and Tao.Platform.Windows and it's AFAIK the only OpenGL wrapper that's still being updated. If you use that and Tao.Sdl without any windows-only classes you shouldn't even have to recompile between Windows and Linux; that's what I'm doing.
http://www.taoframework.com/

Many examples in

http://cvs.hispalinux.es/cgi-bin/cvsweb/tao/Examples/Projects/?cvsroot=mono
this site is a mess...
several empty folders etc.,
I couldn't find any documentation or examples which actually showed the usage of the tao-library (instead of c# ported nehe base code and stuff...),
but maybe that's because I was too tired and unpatient?
I'll look again later... *g* I got too few sleep recently.
guys you have any idea on how to use opengl(particularly DLL) on C#? I want ot create my OWN opengl calss just by importing the dll from opengl and stuff..

thanks
If that is the case, then I would check out the NeHeGL C# Basecode. That is exactly what it does! You can find it here. Just scroll down and it should be on the left sidebar. If nothing else, this will serve as a good starting point (showing how to use [DllImport] for the funtions and how to define all the OpenGL constants, etc). HTH, and good luck!
~del
That's pretty much all Tao.OpenGL is, all of the OpenGL functions as static functions in a OpenGL class, and all of the #defines as constant integers. It provides some bindings as byte[] instead of raw IntPtr's, but that's about all it does for you beyond the C/C++ OpenGL .dll.

This topic is closed to new replies.

Advertisement