Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 10 of 10

Thread: .NET with OpenGL... Is it worth it?

  1. #1
    Intern Contributor
    Join Date
    Jul 2003
    Location
    Rhode Island
    Posts
    56

    .NET with OpenGL... Is it worth it?

    Hi all,

    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
    zix

  2. #2
    Member Regular Contributor
    Join Date
    Mar 2003
    Location
    Spain
    Posts
    269

    Re: .NET with OpenGL... Is it worth it?

    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).]
    "I don't know... with a casual fly"

  3. #3
    Junior Member Regular Contributor
    Join Date
    May 2003
    Location
    New York
    Posts
    206

    Re: .NET with OpenGL... Is it worth it?

    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).

    Avi

  4. #4
    Advanced Member Frequent Contributor
    Join Date
    Oct 2000
    Location
    Belgium
    Posts
    857

    Re: .NET with OpenGL... Is it worth it?

    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.

    -- Tom

  5. #5
    Intern Contributor
    Join Date
    Jul 2003
    Location
    Rhode Island
    Posts
    56

    Re: .NET with OpenGL... Is it worth it?

    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)

    Thanks again
    zix

    [This message has been edited by zix99 (edited 01-13-2004).]

  6. #6
    Member Regular Contributor
    Join Date
    Mar 2003
    Location
    Spain
    Posts
    269

    Re: .NET with OpenGL... Is it worth it?

    .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).]
    "I don't know... with a casual fly"

  7. #7
    Intern Contributor
    Join Date
    Jul 2003
    Location
    Rhode Island
    Posts
    56

    Re: .NET with OpenGL... Is it worth it?

    Thanks for the explanation on .net, i knew it was a framework, just didn't know much else.

    Thanks you all again

  8. #8
    Junior Member Newbie
    Join Date
    Jan 2004
    Location
    UK
    Posts
    4

    Re: .NET with OpenGL... Is it worth it?

    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.

    Thanx

  9. #9
    Junior Member Newbie
    Join Date
    Jan 2004
    Location
    UK
    Posts
    4

    Re: .NET with OpenGL... Is it worth it?

    Thanks, figured it out, it was surprisingly easy in the end . Thanks

  10. #10
    Junior Member Newbie
    Join Date
    Nov 2004
    Posts
    1

    Re: .NET with OpenGL... Is it worth it?

    Originally posted by Takura:
    Thanks, figured it out, it was surprisingly easy in the end . Thanks
    Takura
    Could you please post a sample program? I'm trying to do the same thing (.net windows forms and opengl).
    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •