PDA

View Full Version : Porting to OpenGL for Microsoft Visual C++.NET (2002)



Scott Chang
08-04-2003, 03:32 AM
Hi all,

I am a new user of OpenGL version 1.2. Please tell me how to do porting to OpenGL 1.2 for Managed C++ coding in Microsoft Visual C++.NET (2002).

Thanks in advance,
Scott Chang

Jared@ETC
08-04-2003, 06:58 AM
To .NET from ??? VC6?

Scott Chang
08-04-2003, 08:10 AM
I want to use OpenGL 1.2 in Managed C++ Coding of VC++.NET (2002)that is quite different from VC++ 6.0 - _tmain () or wmain () [not main ()] is used in Managed C++. Any special things do we have to watch out? Please reply if you have used OpenGL 1.2 in this new Managed C++ environment.
Thanks again,
Scott Chang

mikael_aronsson
08-04-2003, 08:31 AM
Hi !

There is nothing special to it, well it will run a bit slower but that's it.

When you use managed code it is just another compiler that outputs MSIL code instead of machine code, but you can also use #pragma's to control which part of the source that should generate native code, so you can go on and call OpenGL just as usual.

The only problem is that the calling gateway between .NET managed code and native code is pretty heavy so you will lose lots of performance if you go on and call OpenGL functions from managed code, try to make the methods/functions that makes calls to OpenGL native (#pragma unmanaged)

I hope that helps

Mikael


[This message has been edited by mikael_aronsson (edited 08-04-2003).]