README.DirectFB
changeset 7222 2435b221d77d
parent 7221 122c97a210bc
child 7223 76fa20889de8
equal deleted inserted replaced
7221:122c97a210bc 7222:2435b221d77d
     1 SDL on DirectFB
       
     2 
       
     3 Supports:
       
     4 
       
     5 - Hardware YUV overlays
       
     6 - OpenGL - software only
       
     7 - 2D/3D accelerations (depends on directfb driver)
       
     8 - multiple displays
       
     9 - windows
       
    10 
       
    11 What you need:
       
    12 
       
    13 DirectFB 1.0.1, 1.2.x, 1.3.0
       
    14 Kernel-Framebuffer support: required: vesafb, radeonfb .... 
       
    15 Mesa 7.0.x	   - optional for OpenGL
       
    16 
       
    17 /etc/directfbrc
       
    18 
       
    19 This file should contain the following lines to make
       
    20 your joystick work and avoid crashes:
       
    21 ------------------------
       
    22 disable-module=joystick
       
    23 disable-module=cle266
       
    24 disable-module=cyber5k
       
    25 no-linux-input-grab
       
    26 ------------------------
       
    27 
       
    28 To disable to use x11 backend when DISPLAY variable is found use
       
    29 
       
    30 export SDL_DIRECTFB_X11_CHECK=0
       
    31 
       
    32 To disable the use of linux input devices, i.e. multimice/multikeyboard support,
       
    33 use
       
    34 
       
    35 export SDL_DIRECTFB_LINUX_INPUT=0
       
    36 
       
    37 To use hardware accelerated YUV-overlays for YUV-textures, use:
       
    38 
       
    39 export SDL_DIRECTFB_YUV_DIRECT=1
       
    40 
       
    41 This is disabled by default. It will only support one 
       
    42 YUV texture, namely the first. Every other YUV texture will be
       
    43 rendered in software.
       
    44 
       
    45 In addition, you may use (directfb-1.2.x)
       
    46 
       
    47 export SDL_DIRECTFB_YUV_UNDERLAY=1
       
    48 
       
    49 to make the YUV texture an underlay. This will make the cursor to
       
    50 be shown.
       
    51 
       
    52 Simple Window Manager
       
    53 =====================
       
    54 
       
    55 The driver has support for a very, very basic window manager you may
       
    56 want to use when running with "wm=default". Use
       
    57 
       
    58 export SDL_DIRECTFB_WM=1
       
    59 
       
    60 to enable basic window borders. In order to have the window title rendered,
       
    61 you need to have the following font installed:
       
    62 
       
    63 /usr/share/fonts/truetype/freefont/FreeSans.ttf
       
    64 
       
    65 OpenGL Support
       
    66 ==============
       
    67 
       
    68 The following instructions will give you *software* OpenGL. However this
       
    69 works at least on all directfb supported platforms.
       
    70 
       
    71 As of this writing 20100802 you need to pull Mesa from git and do the following:
       
    72 
       
    73 ------------------------
       
    74 git clone git://anongit.freedesktop.org/git/mesa/mesa
       
    75 cd mesa 
       
    76 git checkout 2c9fdaf7292423c157fc79b5ce43f0f199dd753a
       
    77 ------------------------
       
    78 
       
    79 Edit configs/linux-directfb so that the Directories-section looks like
       
    80 ------------------------
       
    81 # Directories
       
    82 SRC_DIRS     = mesa glu 
       
    83 GLU_DIRS     = sgi
       
    84 DRIVER_DIRS  = directfb
       
    85 PROGRAM_DIRS = 
       
    86 ------------------------
       
    87 
       
    88 make linux-directfb
       
    89 make
       
    90 
       
    91 echo Installing - please enter sudo pw.
       
    92 
       
    93 sudo make install INSTALL_DIR=/usr/local/dfb_GL
       
    94 cd src/mesa/drivers/directfb
       
    95 make
       
    96 sudo make install INSTALL_DIR=/usr/local/dfb_GL
       
    97 ------------------------
       
    98 
       
    99 To run the SDL - testprograms:
       
   100 
       
   101 export SDL_VIDEODRIVER=directfb
       
   102 export LD_LIBRARY_PATH=/usr/local/dfb_GL/lib
       
   103 export LD_PRELOAD=/usr/local/dfb_GL/libGL.so.7
       
   104 
       
   105 ./testgl
       
   106