README.DirectFB
author Sam Lantinga <slouken@libsdl.org>
Mon, 16 Aug 2010 09:04:55 -0700
changeset 4636 b196d2758026
parent 3023 d72a0dd80e8b
child 5199 164f20ba08eb
permissions -rw-r--r--
Couriersud to Sam

Hi Sam,

20100815_1.diff contains updates for the directfb driver:

- more documentation, mainly on software OpenGL in README.directfb
- Revised error handling leading to leaner code
- Improved/fixed OpenGL handling of multiple contexts.
- Made the built-in simple window manager handle OpenGL windows.
- Rewrote pixelformat mapping - this was quite ugly before.

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