Thread: My Easy SDL Framework for everyone

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    403

    My Easy SDL Framework for everyone

    I wrote this for my own organization.. but I released it under a real liberal Open Source License.

    http://www.conceptofzero.com/code is the base directory. The license + code is there.. and there is some real nice docs. SDLManager2 is optional.. dont use it if you dont have the libraries to use it (read the docs for more info)

    and Doxygen docs coming soon for the 2nd half (they do take a while)

    enjoy.. and feel free to ask questions / give any feedback
    Hopefully this will make SDL easier to use.

  2. #2
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    making SDL easier to use, eh? sorry, I don't think I'll probably be enlisting in your effort...I profiled my code today, and I found that it is spending 99.1% of the time calling _SDL_FLIP, making it run slowly as a whole...you don't have any suggestions for that, do you?

  3. #3
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,743
    >Hopefully this will make SDL easier to use.

    you mean SDL is hard to use in the first place?
    My Website

    "Circular logic is good because it is."

  4. #4
    Unregistered
    Guest
    SDL_Flip waits for a vync. I think the only way for it not to wait for a vsync is to do something like this
    LPDIRECTDRAWSURFACE3 dd_surface = sdl_surface->private_hwdata->dd_surface and then calling direct draws flip function with DDFLIP_NOVSYNC or something like that. Note that you will have to define struct private_hwdata as
    struct private_hwdata {
    LPDIRECTDRAWSURFACE3 dd_surface;
    LPDIRECTDRAWSURFACE3 dd_writebuf;
    };
    since sdl hides this from you and of course you will have to be
    using directx.

  5. #5
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,263
    for disabling V-Sync in OpenGL in windows

    http://www.steinsoft.net/programming...l/snippet7.htm

    >
    I profiled my code today, and I found that it is spending 99.1% of the time calling _SDL_FLIP, making it run slowly as a whole...you don't have any suggestions for that, do you?
    <

    draw more stuff, do more processing.
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

  6. #6
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    if I disabled letting it wait for a vertical retrace (I assume that's what you meant by Vsync) wouldn't it tear the screen? Also, I do plan on drawing more stuff and doing more processing between flips, the problem is that there is too much time between the flips to get a good frame rate.

  7. #7
    Registered User
    Join Date
    Aug 2001
    Posts
    403
    no I can't speed that up unless you go into the DX.. my framework is for people that dont know SDL in general.. it takes SDL from a 5th grade level down to a 1st grade level for people.. just making the API incredibly simple.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problems compiling this SDL app
    By Rider in forum C++ Programming
    Replies: 3
    Last Post: 03-27-2007, 12:22 PM
  2. SDL and MinGW Studio
    By Vicious in forum Tech Board
    Replies: 0
    Last Post: 07-30-2004, 09:59 PM
  3. SDL and Windows
    By nickname_changed in forum Windows Programming
    Replies: 14
    Last Post: 10-24-2003, 12:19 AM
  4. sdl in c++
    By Klinerr1 in forum C++ Programming
    Replies: 8
    Last Post: 07-07-2002, 07:46 AM