View Full Version : .NET with OpenGL... Is it worth it?
01-13-2004, 11:20 AM
I was wondering is it worth it to learn .NET to program with OpenGL? If you could compare it to other languages like C++ or VB that would be great.
My main focus is speed, not how hard it is to code. I would like to know, do I get about the same FPS as c++?
Thanks for any input
01-13-2004, 11:32 AM
Hello, i am writting an OpenGL program using C++ .NET, in a mixed app (managed and no-managed code), and, at the moment, i don't see much diference in the FPS, but a real thing is that .NET slows down the app a bit.
I am using Windows Forms, and two opengl contexts (i am rendering to two Panels (512x512 and 256x256)), with an AMD 1Ghz and 3dLabs vp560 card i get near 600 fps 'simultaneoulsy' in the two contexts (both rendering at the form idle time). I doesn't throwing a lot of vertices, only about 1400.
[This message has been edited by Ffelagund (edited 01-13-2004).]
01-13-2004, 11:46 AM
I had to learn C#/OpenGl for a recent client and it was pretty painless.
The biggest hassle was dealing with managed data structures vs. OGL's pointers, which gets very annoying with all the 'fixed' blocks. I wound up having to use C# like C++ in many cases, making unmanaged structures with a custom memory allocator.
So the net effect is that the OGL portions of the code are about as fast as C++, but gain nothing from C#'s extra management.
The thing I did not try was initializing extensions. Importing from DLLs is easy, but I didn't see an easy way to set up function pointers (it could be easy -- I just didn't have time to explore it).
01-13-2004, 12:31 PM
I'm moving this thread to the windows-specific forum...
I think you should really just forget about speed and use whatever lets you be the most productive. I really don't expect the choice of language to make much of a difference unless you plan to do really CPU-intensive (i.e. non-graphics) stuff.
01-13-2004, 02:11 PM
Thanks for the advice
As to you moderator, Srry, I wasn't sure which to put it in... windows specific or advanced, so I put it in advanced.
I'm a total noob when it comes to .Net, so are there different types of .Net, like vb.net and c++.net, or just one? If it is multiples, which one would you recommend? (I haven't bought anything yet, just looking to use it for a hobby; I've used opengl before with VB)
[This message has been edited by zix99 (edited 01-13-2004).]
01-13-2004, 11:43 PM
.NET isn't a language. .NET is a framework, a garbage collector, a security system, a new data access, and a lot of languages (C++ .NET, C# (windows and linux version (named 'mono'), VB .NET, Gtk#, Cobol#, and so on. All of these languages are managed (garbage collector), but some of them (like C++ managed, allows a mixted mode, you can mix in the same app the standard C++ and the C++ .NET, the only diference (a grosso modo) id that the managed objects are collected by the garbage collector, and you mush explicity delete no-managed objects (as C++ standard). This allows the reusability of all your C++ libraries in the .NET platform
[This message has been edited by Ffelagund (edited 01-14-2004).]
01-14-2004, 10:10 AM
Thanks for the explanation on .net, i knew it was a framework, just didn't know much else.
Thanks you all again
01-19-2004, 05:38 AM
Ffelagund, could you please provide an example of how u set up Opengl using Windows Forms and MC++. I'm used to the MFC way, and am just embracing .NET, which I must admit has been a cool experience.
01-19-2004, 11:53 PM
Thanks, figured it out, it was surprisingly easy in the end http://www.opengl.org/discussion_boards/ubb/wink.gif. Thanks
11-19-2004, 08:37 AM
Originally posted by Takura:
Thanks, figured it out, it was surprisingly easy in the end http://www.opengl.org/discussion_boards/ubb/wink.gif. ThanksTakura
Could you please post a sample program? I'm trying to do the same thing (.net windows forms and opengl).
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.