Results 1 to 15 of 15

Thread: ClanLib V2.0 SDL

  1. #1
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default ClanLib V2.0 SDL

    I am thinking of resurecting ClanSDL for ClanLib V2.0

    Although it is inferior to ClanGL, it has huge support for linux.

    One of the main drawbacks of ClanLib V2.0, is that it does not support below than OpenGL V2.0, this covers quite a lot of linux users, due to the lack of linux 3d graphic card drivers.

    Maybe we could also provide a ClanGL_Legacy, but if ClanSDL exists, there would be no point (imo)

    Any comments?

  2. #2

    Default

    i think it is a good idea. 3d acceleration support is very limited.
    for an example most of the BSD distros has no binary drivers only Direct Rendering Infrastructure to provide acceleration, not all even have that.
    and on linux not everyone wants to use binary only drivers for many different
    reasons. so SDL is the way to go when 2d is good enough.

  3. #3
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    554

    Default

    If you want to resurrect a SDL target, that is of course easy enough. Basically you just need to take the GDI target and replace any rendering calls for CL_PixelPipeline and direct them at the equivalents in SDL.

    I am a bit unsure why you would want to do this. I have not looked at SDL for some time, and therefore do not know if its still based on the DirectDraw way of thinking with surface objects that you blit with, or if modern SDL has been updated since then (about ten years ago). But what worries me is that it still might be and therefore need several additional libraries just to draw a surface rotated.

    The way I see it, there are only two advantages of using SDL as rendering backend:

    • You get the rendering targets of SDL (most of them esoteric)
    • You get the blitter functions of SDL

    Now, for the blitter functions, I'd really really like to be able to move them into clanGDI because they are far faster than the generic ones I've written in vanilla C++. Unfortunately, for licensing reasons, the SDL blitters are not Free (as in true freedom) and cannot be simply assimilated like that. But by using them in SDL as they are, they may not use multiple cores. And if that's the case, it would really be better to have our own that can use all the cores available in modern computers.

    I'm sure the blitters themselves are easilly patchable to be capable to do it, but the entire SDL library has to be ready to use them in such a fashion as well. Which brings us back to the original problem - if SDL hasn't technologically evolved since its early days, then I think it would be better to simply write some faster blitters in clanGDI. Of course if SDL truely can blit with multiple cores and so on, then it would no doubt be a nice target to have.

    Maybe someone with more SDL knowledge could comment on how SDL looks like today compared to the early days?

    Either way, I won't stand in the way for having a second software render target - but I do not personally want to work with (L)GPL licensed projects, because I highly disagree on their political goals and how they use the preamble to 'color' any piece of software released with it. Hence why I didn't even bother go to the SDL site to research it further.

  4. #4

    Default

    i just want to point out that SDL 1.3 and newer will also be available under an alternative commercial license.

  5. #5
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    Quote Originally Posted by gergo View Post
    i just want to point out that SDL 1.3 and newer will also be available under an alternative commercial license.
    I want to know what the alternative license will be!

    Looking at, http://www.galaxygameworks.com/ and http://www.libsdl.org/license.php does not specify the terms, except a link to "contact us about getting a commercial license." which I find worrying.

    Also, looking at http://thread.gmane.org/gmane.comp.l...89/focus=39525 ,it looks like it will be a fee based license.

    /me loves Clanlib license

  6. #6

    Default

    as far as i know the details of commercial license is negotiable. but yes it seems that there is a fee. but LGPL is good enough for many purposes but not all. a company can purchase a license if they need to do so. its not free as a beer but covers all possible needs.

    personally i don't agree with GPL way of thinking, but in cases where the project is good as SDL is, it would be shame to ignore it just for that.

  7. #7
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    I have placed the framework API for SDL target into the ClanLib 2.0 SVN.

    At the moment, the basic2d example opens a window, and you can click on the window to close it.

    SDL V1.2 (release) only supports a single window
    SDL V1.3 (development) I believe supports multiple windows

    Which one should we support directly? Or should we use a #ifdef SDL_V1_3 define ?

  8. #8
    Lesser Knight
    Join Date
    Mar 2009
    Posts
    54

    Default

    Excuse me for going off topic...


    My main concern is that some people do not have the driver or hardware required for OpenGL 2.0.

    That brings me onto a question.
    Would it be possible to make the SDL target support hardware acceleration?

    I know for a fact that SDL is a software rendering library. So I guess hardware acceleration isn't possible.

    Can someone experienced please enlighten me. What could I possibly do to make Clanlib 2.0 support OpenGL <= 1.5

    Edit: +1 ClanGL_Legacy sounds interesting

    Cheers,

    Hunter
    Last edited by huntercool; 05-06-2009 at 11:45 PM. Reason: ClanGL_Legacy sounds interesting

  9. #9
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,343

    Default

    Hmm, I wonder if ClanGL Legacy++ could also be made to support GL ES.. (They are very close already...) .. Would make porting to the iPhone easier.
    Seth A. Robinson
    Robinson Technologies

  10. #10
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    The SDL target could the include legacy GL support. Where SDL GL is not available, I plan to fallback on sdl-gfx.

  11. #11
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    For interest, in SVN
    ClanSDL works for the Basic2D and Pacman example.

    The keyboard interface does not work (due to a silly bug I have some, that I can't find!) - For some reason, the signal is not being emitted.

    Joystick / Mouse not yet implemented

    Also, it only works for Linux. It will be a pain to implement it for windows, and pointless in my opinion

  12. #12
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    ClanSDL for linux is now finished.

    It runs Basic2D and Pacman, and supports keyboard and mouse.

  13. #13

    Default

    Quote Originally Posted by rombust View Post
    ClanSDL for linux is now finished.

    It runs Basic2D and Pacman, and supports keyboard and mouse.
    Nice.

    It seems I have no reasons to keep ClanLib 1.0 for my project !

    Thx

  14. #14
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    ClanLib SDL now works on Win32 (In SVN)

    Note, if you use the precompiled binaries:

    http://clanlib.org/download/binaries.../SDL-1.2.9.zip
    http://clanlib.org/download/binaries...gfx-2.0.13.zip

    The include files inside the sdl-gfx package should be placed into a sub-directory of SDL, not the base directory.

    For example:
    Directory of C:\Users\mark\Documents\include\SDL

    12/05/2009 09:50 3,917 begin_code.h
    12/05/2009 09:50 1,423 close_code.h
    12/05/2009 09:50 3,186 SDL.h
    ...
    12/05/2009 09:50 7,363 SDL_gfxPrimitives.h
    12/05/2009 09:50 64,859 SDL_gfxPrimitives_font.h
    12/05/2009 09:50 2,307 SDL_rotozoom.h

    I hope to fix this soon

    Also, the configure application has been updated, to contain a checkbox to "include SDL target"
    Last edited by rombust; 05-12-2009 at 11:33 AM. Reason: Mention configure application

  15. #15
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    For reference, ClanLib 2.0 "OpenGL 1.3" support now exists - See http://www.rtsoft.com/forums/showthread.php?t=2708

Bookmarks

Bookmarks

Posting Permissions

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