README.QNX
author Sam Lantinga <slouken@libsdl.org>
Sat, 14 Feb 2004 20:22:21 +0000
changeset 821 30168104389f
parent 753 b14fdadd8311
child 886 05c551e5bc64
permissions -rw-r--r--
Date: Sat, 14 Feb 2004 14:52:40 +0200
From: "Mike Gorchak"
Subject: Batch of the QNX6 fixes for the SDL

1. Updated readme.QNX
2. Fixed crashes during intensive window updating under fast machines (got over 200 rectangles for update).
3. Fixed double-buffered fullscreen modes, now it works as needed.
4. Fixed Photon detection algorithm.
5. Fixed HWSURFACE update function.
6. Added SDL_PHOTON_FULLSCREEN_REFRESH environment variable support for control refresh rates under Photon.
7. Added 640x400 fullscreen mode emulation via 640x480 (if videodriver not supports original 640x400 mode of course) shifted by 40 vertical pixels from begin, to center it. It's needed for some old DOS games which ran in doubled 320x200 mode.
8. Added available video ram amount support.
8. Added hardware surface allocation/deallocation support if current videomode and videodriver supports it.
9. Added hardware filling support.
10. Added hardware blits support (simple and colorkeyed).

And I've added to testvidinfo test color-keyed blits benchmark (maybe need to add alpha blits benchmark too ?). Currently Photon not supporting any alpha hardware blittings (all drivers lack of alpha blitting code support, only software alpha blitting exist in photon, which is hundreds times slowest than the SDL's one). So I've not added the alpha support. I suppose new QNX 6.3 will have the hardware alpha support, so when it will be done, I'll add alpha support.
slouken@380
     1
README by Mike Gorchak <mike@malva.ua>, <lestat@i.com.ua>
slouken@821
     2
Last changed at 14 Feb 2004.
slouken@753
     3
slouken@753
     4
======================================================================
slouken@753
     5
Table of Contents:
slouken@753
     6
slouken@753
     7
1. OpenGL.
slouken@753
     8
2. Wheel and multi-button mouses.
slouken@753
     9
3. CDROM handling issues.
slouken@753
    10
4. Hardware video overlays.
slouken@753
    11
5. Shared library building.
slouken@753
    12
6. Some building issues.
slouken@753
    13
7. Environment variables.
slouken@663
    14
slouken@692
    15
======================================================================
slouken@821
    16
1. OpenGL:
slouken@266
    17
slouken@692
    18
    OpenGL works well and is stable, but fullscreen mode has not  been
slouken@692
    19
heavily tested yet.
slouken@692
    20
    If you have QNX RtP version 6.1.0 or above you must  download  the
slouken@692
    21
Photon3D runtime from http://developers.qnx.com or install it from the
slouken@692
    22
public repository or the  public CD, available  with  QNX. OS versions
slouken@692
    23
below 6.1.0 are not supported.
slouken@692
    24
    When creating an OpenGL context, software renderer mode is artifi-
slouken@692
    25
cially selected (QSSL made acceleration  only  for  Voodoo  boards  in
slouken@692
    26
fullscreen mode, sorry but I don't have this board  to  test  OpenGL -
slouken@692
    27
maybe it works or maybe not :)). If you  want  acceleration - you  can
slouken@753
    28
remove one line in the source code: find the  file SDL_ph_image.c  and
slouken@692
    29
remove the following
slouken@279
    30
slouken@663
    31
    OGLAttrib[OGLargc++]=PHOGL_ATTRIB_FORCE_SW;
slouken@663
    32
     
slouken@692
    33
line in the ph_SetupOpenGLContext() function or change the argument to
slouken@692
    34
PHOGL_ATTRIB_FORCE_HW or PHOGL_ATTRIB_FAVOR_HW.
slouken@266
    35
slouken@692
    36
======================================================================
slouken@821
    37
2. Wheel and multi-button mouses:
slouken@663
    38
slouken@692
    39
    Photon emits  keyboard  events (key up and down)  when  the  mouse
slouken@692
    40
wheel is moved. The key_scan field appears valid, and it contains zero.
slouken@692
    41
That is a basic method of detecting  mouse  wheel events under Photon.
slouken@692
    42
It looks like a hack, but it works for me :) on various PC  configura-
slouken@692
    43
tions.
slouken@663
    44
slouken@692
    45
I've tested it on:
slouken@663
    46
slouken@663
    47
1. Genius Optical NetScroll/+ (1 wheel)
slouken@692
    48
2. A4Tech Optical  GreatEye  WheelMouse,  model: WOP-35. (2 wheels + 2
slouken@692
    49
   additional buttons). The wheel for vertical scrolling works as usu-
slouken@692
    50
   al, but the second wheel for horizontal scrolling emits two sequen-
slouken@692
    51
   tial events up or down, so it can provide faster scrolling than the
slouken@692
    52
   first wheel. Additional buttons don't emit any events, but it looks
slouken@692
    53
   like they're handled by photon in an unusual  way - like  click  to
slouken@692
    54
   front, but works not with any window, looks like bug-o-feature :).
slouken@663
    55
slouken@692
    56
======================================================================
slouken@821
    57
3. CDROM handling issues:
slouken@663
    58
slouken@692
    59
    Access to CDROM can only be  provided  with  'root'  privileges. I
slouken@692
    60
can't do anything about that, /dev/cd0 has brw------- permissions  and
slouken@692
    61
root:root rights.
slouken@663
    62
slouken@692
    63
======================================================================
slouken@821
    64
4. Hardware video overlays:
slouken@663
    65
slouken@692
    66
    Overlays can flicker  during  window  movement,  resizing, etc. It
slouken@692
    67
happens because the photon driver updates the real window contents be-
slouken@692
    68
hind the overlay, then draws the temporary chroma key color  over  the
slouken@692
    69
window contents. It can be done without using the chroma key but  that
slouken@692
    70
causes the overlay to always be on top. So  flickering  during  window
slouken@692
    71
movement is preferred instead.
slouken@692
    72
    Double buffering code is temporarily disabled in the photon driver
slouken@692
    73
code, because on my GF2-MX it can accidentally cause a buffer  switch,
slouken@692
    74
which causes the old frame to show. S3 Savage4 has the  same  problem,
slouken@692
    75
but ATI Rage 128 doesn't. I think it can be fixed later. Current  code
slouken@692
    76
works very well, so maybe double buffering is not needed right now.
slouken@692
    77
    Something strange happens when you try to move the window with the
slouken@692
    78
overlay beyond the left border  of the screen. The  overlay  tries  to
slouken@692
    79
stay at position x=0, but when attempting to move it  a  bit  more  it
slouken@692
    80
jumps to position x=-60 (on GF2-MX, on ATI Rage128 this  value  a  bit
slouken@692
    81
smaller). It's really strange, looks  like  the  overlay  doesn't like
slouken@692
    82
negative coordinates.
slouken@663
    83
slouken@692
    84
=======================================================================
slouken@821
    85
5. Shared library building:
slouken@663
    86
slouken@692
    87
    A shared library can be built, but before running  the  autogen.sh
slouken@692
    88
script you must manually delete the libtool.m4 stuff from the acinclu-
slouken@692
    89
de.m4 file (it comes after the ESD detection code up to the end of the
slouken@821
    90
file), because the libtool stuff in the acinclude.m4 file was very old
slouken@821
    91
in SDL distribution before the version 1.2.7 and doesn't knew anything
slouken@753
    92
about QNX. SDL 1.2.7 distribution contain  the  new libtool.m4 script,
slouken@753
    93
but anyway  it  is  broken :), Just  remove  it, then  run "libtoolize
slouken@753
    94
--force --copy",  delete the file aclocal.m4 and after  that  run  the
slouken@753
    95
autogen.sh script.
slouken@663
    96
slouken@692
    97
======================================================================
slouken@821
    98
6. Some building issues:
slouken@266
    99
slouken@692
   100
    Feel free to not use the --disable-shared configure option if you'
slouken@692
   101
ve read the above comment about 'Shared  library  building'. Otherwise
slouken@692
   102
this  option  is  strongly  recommended, as  without it the sdl-config
slouken@692
   103
script will be broken.
slouken@663
   104
slouken@692
   105
    Run the configure script without x11 support, e.g.:
slouken@266
   106
slouken@279
   107
    a) for OpenGL support:
slouken@692
   108
    ./configure --prefix=/usr       \
slouken@279
   109
                --disable-video-x11 \
slouken@279
   110
                --disable-shared
slouken@279
   111
slouken@291
   112
    b) without OpenGL support:
slouken@692
   113
    ./configure --prefix=/usr       \
slouken@279
   114
                --disable-video-x11 \
slouken@279
   115
                --disable-shared    \
slouken@279
   116
                --disable-video-opengl
slouken@266
   117
slouken@692
   118
    In the test directory also run the ./configure script without
slouken@692
   119
x11 support, e.g.:
slouken@266
   120
slouken@692
   121
    ./configure  --with-sdl-prefix=/usr            \
slouken@692
   122
                 --with-sdl-exec-prefix=/usr       \
slouken@692
   123
                 --prefix=/usr --without-x
slouken@753
   124
slouken@753
   125
======================================================================
slouken@821
   126
7. Environment variables:
slouken@753
   127
slouken@753
   128
    Please note that the photon driver  is  sensible to the  following
slouken@753
   129
environmental variables:
slouken@753
   130
slouken@821
   131
 * SDL_PHOTON_FULLSCREEN_REFRESH - this environment variable controls
slouken@821
   132
the refresh rate in all fullscreen modes. Be carefull !!! Photon drivers
slouken@821
   133
usually do not checking the maximum refresh rate, which video adapter or
slouken@821
   134
monitor supports.
slouken@821
   135
slouken@753
   136
 * SDL_VIDEO_WINDOW_POS - can be  set in the "X,Y" format.  If X and Y
slouken@753
   137
coordinates are bigger than the current desktop resolution, then  win-
slouken@753
   138
dow positioning across  virtual  consoles is activated. If X and Y are
slouken@753
   139
smaller than the desktop resolution  then  window  positioning  in the
slouken@753
   140
current console is activated. The word "center" can be used instead of
slouken@753
   141
coordinates, it  produces  the  same  behavior  as  SDL_VIDEO_CENTERED
slouken@753
   142
environmental variable.
slouken@753
   143
slouken@753
   144
 * SDL_VIDEO_CENTERED - if this environmental variable exists then the
slouken@753
   145
window centering is perfomed in the current virtual console.
slouken@753
   146
slouken@753
   147
    The SDL_VIDEO_CENTERED enviromental variable has greater  priority
slouken@753
   148
than the SDL_VIDEO_WINDOW_POS in case if both variables  are  supplied
slouken@753
   149
to the application.