X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=docs%2Fglfbdev-driver.html;h=981df7c088a09abb8528eb4a66e4a8fcc86b447d;hb=3640e4acde2fb050b1659271d1687a8a5f90365d;hp=b49950eb9e1bb144b40329df62df26f182ca29bc;hpb=36da0459e4d0b12ab46f0e2090d107a22f68844a;p=mesa.git diff --git a/docs/glfbdev-driver.html b/docs/glfbdev-driver.html index b49950eb9e1..981df7c088a 100644 --- a/docs/glfbdev-driver.html +++ b/docs/glfbdev-driver.html @@ -37,54 +37,75 @@ The GL/glfbdev.h header file defines the glFBDev interface. The progs/fbdev/glfbdevtest.c demonstrates how to use the glFBDev interface.

+

For more information about fbdev, see the Framebuffer Howto

- +

+You will need at minimum, a framebuffer device, check /dev/fb0 +

2. Compilation

To compile Mesa with support for the glFBDev interface:

-   XXX todo
+      make realclean
+      make linux-fbdev
 

When compilation is finished look in progs/glfbdev/ for the glfbdevtest demo.

- -

-xxx todo -

- - -

3. Compiling and linking glFBDev programs

+

3. Permissions

-xxx todo -

- - +Typically /dev/fb/0 is grouped to the video group. It may be useful to add +your user to the video group so the demos will not have to be run as root. +To use fbdevglut with the prefered tty input, you should add the user to the +tty group as well +

-

4. Running glFBDev programs

+

4. Using fbdevglut

+Almost all of the programs in the progs directory use glut, and they compile with fbdevglut.

-First, you need to have a working fbdev environment. -See the - -Framebuffer Howto for information. +To compile the redbook sample programs: +

+       cd progs/redbook
+       make
+

- +

glut features not supported: +

  • Overlays +
  • Subwindows +
  • Input devices other than Keyboard/Mouse +
  • No support for GLUT_MULTISAMPLE, GLUT_STEREO, or GLUT_LUMINANCE +
  • Cursor and Menu Support will flicker in GLUT_SINGLE mode + +

    Keyboard input is read by opening /dev/tty and reading keycodes in medium raw mode. +

    Mouse input is read from env var MOUSE, or /dev/gpmdata and should be in ms3 format. +To forward data in this format to /dev/gpmdata, run gpm with the -Rms3 option. +

    glutInit allows glut programs to pass parameters to the glut library, currently the +following options are supported for fbdevglut: +

  • -geometry widthxheight -- This will force the resolution to be widthxheight instead of autodetecting. +The modes are read from /etc/fb.modes +

  • -bpp -- This will force the bitdepth to the one specified +

  • -vt -- This allows you to specify the virtual terminal to attach keyboard input to. It is useful to specify when running inside screen. +

  • -mousespeed -- A floating point multiplication factor to increase mouse speed +

  • -nomouse -- Disable mouse support +

  • -nokeyboard -- Disable keyboard support (this will probably break mouse support as well) +

  • -stdin -- Use stdin for input instead of attaching to kbd in medium-raw mode. +This will make it impossible to detect keypresses like Shift+Tab, you will also need to specify -gpmmouse for mouse support. This option can be used with a debugger, and it is possible to single step a program with gdb and set the FRAMEBUFFER environment variable to a different framebuffer for display. The program will not be able to handle vt switching on it's own, so it will always display. +

  • -gpmmouse -- This will attempt to connect to the /dev/gpmctl socket using liblow +for mouse data. Gpm does not provide this data when in graphics mode, so vt switching +will briefly display text. This mode typically has no initial mouse delay. +

  • -- Ignore any additional arguments +

    Notes:

    -Programs must be run with root permission. +1. The mouse pointer flickers in single buffering mode, as it must be rendered in software. Hopefully in the future there will be a way to access hardware cursors in fbdev devices.

    - -

    - - -