Results 1 to 6 of 6

Thread: SDL vs. MFC ogl performance

  1. #1
    Member Contributor
    Join Date
    Jan 2002
    Location
    Bozeman, MT
    Posts
    51

    SDL vs. MFC ogl performance

    I'm using SDL in windoze for my window initialization and device input but I see alot of the openGL programmers using MFC. I know there can be issues with color depth in SDL but I am curious if anyone can comment on performance differences between the SDL and MFC. Is it possible that if I continue to use SDL I will eventually end up switching to MFC/DirectInput due to some, currently unforseen, performance issues with SDL?????

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Mar 2001
    Posts
    3,574

    Re: SDL vs. MFC ogl performance

    Well, MFC is a fairly light wrapper around the Win32 API (for the most part). Since SDL adds more layers to allow for cross-platform portability, MFC may well be a bit faster.

    At the same time, MFC is written by Microsoft, so it may be rather inefficiently implemented. If you have VC++, you have the source code for MFC, so if you have serious efficiency concerns, feel free to look at MFC's internals.

  3. #3
    Senior Member Frequent Contributor marcus256's Avatar
    Join Date
    Aug 2001
    Location
    Sweden
    Posts
    764

    Re: SDL vs. MFC ogl performance

    I doubt that there are really any differences in performance, and besides SDL is more portable than MFC. Most of your performance losses/gains will be in the OpenGL parts of things, and that should not be any different between different wrappers.

    Ok, so while I'm at it I can just as well go ahead and recommend GLFW instead, http://hem.passagen.se/opengl/glfw - it's more portable than SDL (ok, it "only" supports Windows and Unix/X11, but at least things work exactly the same way regardless of environment, unlike SDL), and I think you'll aprecieate the API.

  4. #4
    Member Contributor
    Join Date
    Jan 2002
    Location
    Bozeman, MT
    Posts
    51

    Re: SDL vs. MFC ogl performance

    First of all, I think SDL code looks much cleaner in terms of windows initialization and input handling. Second, I do like the portability of SDL - I use it on my Linux/GeForce2 partition. It just seems like I see alot of "hardcore" coders in the advanced ogl forum using MFC.

    Thanks for the cin>>

  5. #5
    Senior Member Regular Contributor
    Join Date
    Jan 2002
    Location
    Kingston, Jamaica, W.I.
    Posts
    282

    Re: SDL vs. MFC ogl performance

    I would take a guess that a lot of hard core programmers did not deliberately choose MFC for OpenGL programming. Either they were used to MFC and just continued using it, they already had access to MS VC++ (office, home, etc) and switching to something new did not look appealing, they had to use MFC because that's the standard among their co-workers/peers, or alternatives were not available or unknown to them at the time. Remember Microsoft has strong brand influence and market share in the programming industry, so it's very likely that a lot of persons will use their IDE and toolkit.

    With that said, MFC has a lot of controls and stuff for windows which makes programming faster and easier. Also the lookup lists and function hints make it one of the best (if not the best) IDEs. People may have problems with it, but I have not heard anyone complain about those features (except that it makes programmers lazy ).

    If you're interested there are a lot of other threads that deal with comparisons. I've include one that I remember (http://www.opengl.org/discussion_boa...ML/007261.html) but you can also search for more. There's also a new forum for discussing toolkits, etc (http://www.opengl.org/discussion_boards/cgi_directory/forumdisplay.cgi?action=topics&forum=OpenGL+Toolki ts+(e.g.+GLUT,+CPW,+GLOW)&number=10&DaysPrune=20&L astLogin=). Check it out and maybe start another thread there.

    [This message has been edited by Furrage (edited 02-08-2002).]

  6. #6
    Member Contributor
    Join Date
    Jan 2002
    Location
    Bozeman, MT
    Posts
    51

    Re: SDL vs. MFC ogl performance

    Yeh, I think VC++ is a really nice IDE too, better than Kdevelop, if you're into linux. And in fact, like you said, my other programming job (finite elements) requires that I use VC++ and MFC.

    Thanks for the links!

    Jeff

Similar Threads

  1. Replies: 1
    Last Post: 04-30-2013, 06:38 AM
  2. Gaming VGA Performance vs 3D Animation Rendering VGA Performance
    By MaoTseTongue in forum OpenGL: User Software
    Replies: 1
    Last Post: 07-25-2007, 03:30 AM
  3. About performance
    By castilleja in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 08-06-2005, 05:03 AM
  4. Poor Game Performance, High Performance Machine
    By Hardlion in forum OpenGL: User Software
    Replies: 2
    Last Post: 03-05-2005, 11:46 AM
  5. VOB performance
    By Csiki in forum OpenGL: Advanced Coding
    Replies: 6
    Last Post: 06-15-2003, 02:40 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean