pouët.net

Go to bottom

c# intro coding

category: general [glöplog]
 
this may sound quite stupid but i guess better ask sooner rather than later, is csgl/tao the only way to get opengl under c#? im trying to avoid .dll's altogether. should i be looking at d3d instead or did i miss something from the internets?
added on the 2008-01-04 09:58:55 by psenough psenough
you should've looked at d3d in the first place - there's just no reason not to, especially with c# - portability is out the window anyway.
added on the 2008-01-04 11:20:09 by Gargaj Gargaj
yeah, really. move to d3d and live happier :)
added on the 2008-01-04 11:36:47 by makc makc
or you could go with the good old Platform Invoke (pinvoke) mechanism for binding unmanaged DLLs. Not nice, but would allow you to link opengl32.dll directly from C#.
Or that other favourite, use managed C++ to write some glue.
added on the 2008-01-04 11:46:09 by minas minas
was just hoping for some hidden solution that would avoid .dll binding and cross language "hacks" but i guess i really should just go d3d once and for all.
thanks for the answers.
added on the 2008-01-04 13:09:20 by psenough psenough
I used opengl under C# and I think it was without dlls (using some wrapping ofcourse). I don't remember how I did it but if you really want to I can have a look, I must have the source somewhere.

added on the 2008-01-04 13:19:24 by Navis Navis
you probably included tao's ogl and windows platform bindings.. would still make pretty fat .exe's i reckon. and besides, i'm also having problems getting font stuff ported from the working c++ ogl framework to this c# csgl hack, so i really should just go d3d. need to figure out the best solution for easy macosx portability but i reckon i already overcomplicated things in that department by having all these .cs's in the first place. -_-
added on the 2008-01-04 13:28:49 by psenough psenough
Gargaj: not exactly true. C# is available in other operating systems as well but who the heck cares about those, they suck anyway. D3D is the only real option and it's far less pain in the arse after you get your polygons drawed to the screen
added on the 2008-01-04 19:45:52 by waffle waffle
C# is actually a rather nice language, much nicer than the abomination they call C++. Perhaps it would be worth it to make the transfer some day..
added on the 2008-01-04 20:05:55 by Preacher Preacher
http://en.wikipedia.org/wiki/DirectX#.NET_Framework
Quote:

While Managed DirectX 2.0 consolidated functionality that had previously been scattered over multiple assemblies into a single assembly, thus simplifying dependencies on it for software developers, development on this version has subsequently been discontinued, and it is no longer supported. The Managed DirectX 2.0 library expired on October 5th, 2006.

During the GDC 2006 Microsoft presented the XNA Framework, a new managed version of DirectX (similar but not identical to Managed DirectX) that is intended to assist development of games by making it easier to integrate DirectX, High Level Shader Language (HLSL) and other tools in one package. It also supports the execution of managed code on the Xbox 360. The XNA Game Studio Express RTM was made available on December 11, 2006, as a free download for Windows XP. Unlike the DirectX runtime, Managed DirectX, XNA Framework or the Xbox 360 APIs (XInput, XACT etc) have not shipped as part of Windows. Developers are expected to redistribute the runtime components along with their games or applications.


So, what to do if I want to code in c#? Use an abandonded framework or go for a new supported one which isnt standard for windows? I would prefer xna since there are new books written about it but I guess it would mean disqualification in compos and massive thumb downs
added on the 2008-01-04 21:06:24 by hollowman hollowman
how would making an xna demo mean disqualification in compos? someone please tell me cause i'm making a demo with it.
added on the 2008-01-04 21:30:40 by skrebbel skrebbel
what skrebbel said
why thumb downs ???

login

Go to top