Results 1 to 5 of 5

Thread: Slowdown on Linux

  1. #1

    Slowdown on Linux

    Hi, it's me again, I'm now using Linux Ubuntu 5.10. My goal is to have my SDL-based engine at nearly the speed as in Windows (well, 30 FPS are the minimum; the basic examples of my engine ran at over 120 FPS on my machine).
    My computer:
    - 1000 MHz
    - 128 MB RAM
    - NVidia GeForce 2 GTS (32 MB)

    I've installed the nvidia-glx-legacy driver from the Ubuntu repository and it seems to work: I get a NVidia-logo at startup and the glxgears application is working at over 1200 FPS. This Frozen-Bubble game (from KDE) is also running at high speed.

    But the compiled examples from my engine only show 8 to 13 FPS. I compiled it with Kylix 3 Open Edition and emulated a few examples with WINE 0.9.12. Both resulted in these low FPS.

    Logger says:
    *** ERROR *** : @ 12:04:58 MSG : Initialization IN : No video modes available!

    STATUS INFO : @ 12:04:58 MSG : Information IN : Video memory: 0 KB

    STATUS INFO : @ 12:04:58 MSG : Information IN : Device: Software
    My code:
    Code:
    [...]
      if SDL_Init&#40;SDL_INIT_VIDEO&#41; <> 0 then
      begin
        if Log <> nil then LogError&#40;'Initialization', 'Could not initialize SDL&#58; ' + SDL_GetError&#41;;
        Finalize;
      end;
    
      If Log <> Nil Then
      Begin
        Modes &#58;= SDL_ListModes&#40;nil, SDL_FULLSCREEN or SDL_HWSURFACE or SDL_SWSURFACE or SDL_ANYFORMAT&#41;;
        If Modes = PPSDL_Rect&#40;0&#41; Then
        Begin
          LogError&#40;'Initialization', 'No video modes available!'&#41;;
        End Else
        Begin
          &#123;TMP_X &#58;= @Modes;
          for i &#58;= 0 to Modes&#91;i&#93; - 1 do  LogStatus&#40; Format&#40; ' %d x %d', &#91; Modes&#91;i&#93;.w, Modes&#91;i&#93;.h &#93; &#41; &#41;; &#125; //This is commented, because it hadn't worked
        End;
      End;
    
      if VideoInfo = nil then
      begin
        if Log <> nil then LogError&#40;'Initialization', 'Could not collect system info -> Application terminated. Error&#58; ' + SDL_GetError&#41;;
        Finalize;
      end;
    
      if VideoInfo.hw_available <> 0  then FFlags &#58;= FFlags or SDL_HWSURFACE
                                      else FFlags &#58;= FFlags or SDL_SWSURFACE;
    
      if Log <> nil then LogStatus&#40;'Information', 'Video memory&#58; '+IntToStr&#40;VideoInfo.video_mem&#41;+ ' KB'&#41;;
      if VideoInfo.blit_hw <> 0  then
      begin
        FFlags &#58;= FFlags or SDL_HWACCEL;
        if Log <> nil then LogStatus&#40;'Information', 'Device&#58; Hardware accelerated'&#41;;
      end else
      begin
        if Log <> nil then LogStatus&#40;'Information', 'Device&#58; Software'&#41;;
      end;
    
    &#91;...&#93;

    Is there a special way of getting SDL working with some more FPS? Or have I made something wrong?
    Freeze Development | Elysion Game Framework | Twitter: @Stoney_FD
    Check out my new book: Irrlicht 1.7.1 Realtime 3D Engine Beginner's Guide (It's C++ flavored though)

    Programmer: A device for converting coffein into software.

  2. #2

    Slowdown on Linux

    Hi Stoney,
    Only just spotted this thread now. I hope you managed to get an answer or solve it.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  3. #3

    Slowdown on Linux

    I had a performance problem under Linux, it sort-of went away when I dropped my Desktop resolution to 16Bit.

    I think it must be an XWindows thing or an nVidia driver thing.

    Never had the same problems under Windows.

  4. #4

    Slowdown on Linux

    Nvidia does recommend that you run the X windows in 16 bit not 32 under linux. I remember reading that somewhere.
    <A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
    <br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
    <br /></A>

  5. #5
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Slowdown on Linux

    Sounds like a serious problem with X Windows...
    Jason McMillen
    Pascal Game Development
    Co-Founder





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
  •