Does C# support OpenGL1.4??

1> I am learning C# and OpenGl, so

I don’t want to learn C++ again.

2> Which developing_softs support OpenGL_1.4 for developers to use?

Please help me, thanks a lot.

C# has no native support for the OpenGL API. If you want to use OpenGL from C#, you need to write your own interop wrappers or use one of the various samples posted on various sites (Google it).

Because of the interop overhead, opengl apps from C# are noticeably slower than C/C++ equivalents, even on pretty simple scenes.

I can highly recommend learning both C# and OpenGL, but unfortunatley they don’t go too well together

If you don’t want to get too involved in the C/C++ in Windows side of things, then GLUT is probably your best route to get some OpenGL under your belt.

Hi !
C# does not have any support for OpenGL, with that said it’s pretty easy to use OpenGL from C# and you can use OpenGL 1.4 features to, but there is no builtin support for it.

Mikael

Originally posted by Rog:
[b]C# has no native support for the OpenGL API. If you want to use OpenGL from C#, you need to write your own interop wrappers or use one of the various samples posted on various sites (Google it).

Because of the interop overhead, opengl apps from C# are noticeably slower than C/C++ equivalents, even on pretty simple scenes.

I can highly recommend learning both C# and OpenGL, but unfortunatley they don’t go too well together

If you don’t want to get too involved in the C/C++ in Windows side of things, then GLUT is probably your best route to get some OpenGL under your belt.[/b]


It’t very king of you helping me. Now I know
that Apps from C# run slower a bit, but I appreciate C# and Java. I think I should knoe about “The GLUT”.

Originally posted by may_hawk:

It’t very king of you helping me. Now I know
that Apps from C# run slower a bit, but I appreciate C# and Java. I think I should knoe about “The GLUT”.

OpenGL works fine in the .NET environment. You need some form of wrapper, I suggest you look at CsGL and Tao.OpenGl:
http://csgl.sourceforge.net

http://www.randyridge.com/Tao

Tao.OpenGl is the ‘newer’ version of CsGL, while only supporting OpenGl 1.1, it has additional benefits of being CLS-compliant (so you can use c#, vb.net, etc), GLUT support, it’s cross-runtime and cross-platform (MS’s and the mono runtime on windows, mono on *nix/*bsd), and API documentation. CsGL, while it’s the older codebase supports OpenGL 1.4, and only has support for Windows. I’d suggest Tao, it won’t be log before they’re back up to supporting OpenGL 1.4.

As for performance, from my tests the P/Invoke overhead is fairly minimal, most apps will run 1-5% slower than c/c++, the largest performance penalty you’ll see is in relation to array performance, particularly multidimensional arrays…


Ridge