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?
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.
yeah, really. move to d3d and live happier :)
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.
Or that other favourite, use managed C++ to write some glue.
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.
thanks for the answers.
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.
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. -_-
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
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..
http://en.wikipedia.org/wiki/DirectX#.NET_Framework
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
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
how would making an xna demo mean disqualification in compos? someone please tell me cause i'm making a demo with it.
what skrebbel said
why thumb downs ???
why thumb downs ???