PDA

View Full Version : VB.net ??



KlausCDN
10-02-2005, 03:12 PM
Hi,

I'm new to VB.net programming. In the last some years I made some programs in C++ and OpenGL. This was quite complicated. When I changed to VB.net I found Randy Ridge's Tao. But his Website does apparently no longer exist.

What is the "official" recommendation to program OpenGL in VB.net?

Thank you in advance
Klaus

mikael_aronsson
10-02-2005, 10:01 PM
Hi !

As far as I know there is no "official" support for OpenGL (and I would not expect one from MS either).

But there are a number of ways to use OpenGL with .NET, I think there has been som information about those in the past, check the archives.

Mikael

ppeterson
10-04-2005, 05:34 AM
It's true that OpenGL is not supported in .NET so you'll have to use a wrapper around the OpenGL API using Interop calls (System.Runtime.InteropServices.DllImport). I've made one myself (for C#) but you can benefit for various wrappers available on internet. I haven't seen any specifically for VB.NET, but I always (literally, it seems :D ) recommend Nehe\'s site (http://nehe.gamedev.net) as a good place to start. It have VB example code and basecode for an OpenGL user control in .NET.

You need to be aware that OpenGL functions are unmanaged whereas VB.NET is managed. Usually, the difference is taken care in a block of unsafe code within your wrapper (hopefully the person who wrote the one you're going to use did). At other times you'll have to do take some measures yourself.

KlausCDN
10-04-2005, 05:43 AM
Hi ppeterson,

This is a big help for me. I will try to find the best wrapper.

Thank you
Klaus


Originally posted by ppeterson:
It's true that OpenGL is not supported in .NET so you'll have to use a wrapper around the OpenGL API using Interop calls (System.Runtime.InteropServices.DllImport). I've made one myself (for C#) but you can benefit for various wrappers available on internet. I haven't seen any specifically for VB.NET, but I always (literally, it seems :D ) recommend Nehe\'s site (http://nehe.gamedev.net) as a good place to start. It have VB example code and basecode for an OpenGL user control in .NET.

You need to be aware that OpenGL functions are unmanaged whereas VB.NET is managed. Usually, the difference is taken care in a block of unsafe code within your wrapper (hopefully the person who wrote the one you're going to use did). At other times you'll have to do take some measures yourself.