Archived

This topic is now archived and is closed to further replies.

OpenGL in C#

This topic is 5962 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Have a look in your VS.NET documentation for things about "unmanaged" code. For example, this url is a good place to start:

ms-help://MS.VSCC/MS.MSDNVS/cpguide/html/cpconconsumingunmanageddllfunctions.htm

paste that into the "location" section, on the start page of VS.NET.

Be aware that calling DLL (unmanaged) functions from managed code is slower than normal (since it has to marshal the parameters and return value) so try and keep unmanaged calls to a minimum.


War Worlds - A 3D Real-Time Strategy game in development.

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
--> All I can say is: Don''t use C#....

There''s always one of these people, isn''t there?


Of course

While I admit, C# is probably not your best bet for opengl stuff, it still works (though I''ve not actually tried it myself... actually, maybe I''ll give it a go - just for the learning experience st) it''s ill quite fast, certainly as fast as certain other interpreted languages (there''s one who''s name starts with "J", but we won''t mention just now) and people are quite willing to write opengl programs in that "J" language.

From what I hear (and this is only hearsay) MS will be writing a proper .NET wrapper for DirectX (not just "COM thru .NET" which can use right now) so that''ll be interesting.

Personally, I think the best place for .NET is in your game logic, where you don''t want to be bothered with things like memory management (we go to great lengths to reduce the amount of memory management we have to do in our games, well, I do at least) and things like that. Also, .NET allows us to incorperate a scripting language into the game really easily - a big plus I think. I''m sure you could do all that in Java, but Java''s native language bindings are a real pain to use. .NET makes it all but transparent!


War Worlds - A 3D Real-Time Strategy game in development.

Share this post


Link to post
Share on other sites
> Personally, I think the best place for .NET is in your game
> logic

Amen. I always liken this to the move from Assembly to C++/Java/etc. I recall reading an article from an old Atari ST magazine - the author complained that a particlar game felt like it was written, not in Assembly, but in a "[slow], high-level language such as C".

Today, that assertion is ridiculous; C/++ is ubiquitous. I''m not sure how good C# is, but in general, higher level languages help expedite development because they take care of the grunge work.

My two cents more: I find Python to work well with OpenGL.

- Thomas

Share this post


Link to post
Share on other sites