Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

C# and OpenGL

14 views
Skip to first unread message

Martijn Mulder

unread,
Apr 14, 2008, 6:46:13 AM4/14/08
to
I wonder how I can use OpenGL in a C# program WITHOUT using a
'wrapper'like Tao and WITHOUT the Visual Studio IDE.

I want to compile a C# program from the command line that uses an OpenGL
function. If I have one example that does just this, the rest I can make
out myself.

Thank you

Malte Clasen

unread,
Apr 14, 2008, 8:20:09 AM4/14/08
to

You can call any win32 dll with P/Invoke, including the opengl library.
Have a look at:

http://msdn2.microsoft.com/en-us/magazine/cc164123.aspx

Malte

Wolfgang Draxinger

unread,
Apr 14, 2008, 8:22:16 AM4/14/08
to
Martijn Mulder wrote:

Since I've never did any coding with C# and/or .net I'm only
guessing here on what I know about the underlying architecture:
OpenGL is a pretty low level API. For example you're dealing
with naked pointers (void*). C# however compiles to managed
code, which simply includes such concepts. So you _need_ a
wrapper around that low level stuff to map low level pointers to
some abstract buffer instance, with which you can work from
managed code.

If you don't to want use Tao, then you've to write the wrapper
yourself. Sounds like reinventing the wheel to me.

Regarding the other issue: You can perfectly well compile C#
programs without Vitual Studio IDE. Heck, the tools can be
downloaded for free from the Microsoft website. Look for
the ".net SDK". Should bring everything you need.

Wolfgang Draxinger
--
E-Mail address works, Jabber: hexa...@jabber.org, ICQ: 134682867

0 new messages