C#will become public,is it fitted to opengl

i know MicroSoft,so i have to learn to program with C#,but i wonder whether the language is suit to opengl ? how about its performance.

What the hell does “the language is suit to opengl” is suppose to mean?
Ask this in an MS forum. It is a known fact that you must use DX to get the best performance out of C#.


[This message has been edited by V-man (edited 09-13-2002).]

Why would that automatically be true? It may be easier to use DX with C# (because C# supports COM objects natively) but I do not think performance would be any different more different than with C/C++ once you created a Type Library for OpenGL and then used it with C# (A type library is a desciption of an interface, you can make one for OpenGL32.dll). From what I remember, you could make a type library for opengl with no trouble and it probably has already been done for use with Visual Basic.

OpenGL performance is mostly about batching primitives and avoiding redundant state changes. That is possible in any language. Unless you are CPU limited, the choice of languages does not effect your graphics performance.

[This message has been edited by Nakoruru (edited 09-13-2002).]

I guess you didn’t get the joke.


Joke? Oh well, I’m not the first or last person on the internet to miss a joke. You know, the 20th anniversary of the :slight_smile: joke marker is coming up this month (the 20th I believe), maybe you should learn to use it :slight_smile:

Now that’s what I call irony

I’m also interesed in C# and OpenGL.

I have a lot of win32/C++ code that I would like to package into a .NET component (or whatever it’s called), so that it can be used by .NET C#, VB or C++ aplications (through an application specific interface).

Has anybody tried to do this? Basically what I’d like to know is: if its possible to create a managed .NET C++ application that can create a win32 window with an OpenGL rendering context.

Furthermore, it should somehow be possible to use this as a child window in a more complex GUI built used VB or C# tools.

I haven’t looked enought into .NET to know if this is possible. Perhaps somebody here has some experience with it and could give me a few hints.


I think that you would have to use OpenGL as an unsafe component because it uses pointers and I do not think it would play nice with the garbage collector.

However, If you really need safety, I think you could create a safe wrapper around OpenGL. I’m not really sure if its possible, because your ‘safe’ module would only be as safe as the code you write to wrap opengl.

I’m sure that DirectX needs wrapping as well, but I’m sure that Microsoft has already done that for you.

Yes C# is perfectly suitable for OpenGL.
Only problem I currently encounter is calling function pointer for extension, but that’ likely to fixed by next major release. It’s not big problem.

Thanx everyone.
I’ll give it a try then …