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