README.QNX
author Sam Lantinga <slouken@libsdl.org>
Mon, 04 Aug 2003 00:52:42 +0000
changeset 663 8bedd6d61642
parent 380 bce7171e7a85
child 692 04dd6c6d7c30
permissions -rw-r--r--
Date: Sat, 2 Aug 2003 16:22:51 +0300
From: "Mike Gorchak"
Subject: New patches for QNX6

Here my patches for the SDL/QNX:

QNXSDL.diff - diff to non-QNX related sources:

- updated BUGS file, I think QNX6 is now will be officially supported
- configure.in - added shared library support for QNX, and removed dependency between the ALSA and QNX6.
- SDL_audio.c - added QNX NTO sound bootstrap insted of ALSA's.
- SDL_sysaudio.h - the same.
- SDL_nto_audio.c - the same.
- SDL_video.c - right now, QNX doesn't offer any method to obtain pointers to the OpenGL functions by function name, so they must be hardcoded in library, otherwise OpenGL will not be supported.
- testsprite.c - fixed: do not draw vertical red line if we are in non-double-buffered mode.

sdlqnxph.tar.gz - archive of the ./src/video/photon/* . Too many changes in code to make diffs :) :

+ Added stub for support hide/unhide window event
+ Added full YUV overlays support.
+ Added window maximize support.
+ Added mouse wheel events.
+ Added support for some specific key codes in Unicode mode (like ESC).
+ Added more checks to the all memory allocation code.
+ Added SDL_DOUBLEBUF support in all fullscreen modes.
+ Added fallback to window mode, if desired fullscreen mode is not supported.
+ Added stub support for the GL_LoadLibrary and GL_GetProcAddress functions.
+ Added resizable window support without caption.
! Fixed bug in the Ph_EV_EXPOSE event handler, when rectangles to update is 0 and when width or height of the rectangle is 0.
! Fixed bug in the event handler code. Events has not been passed to the window widget handler.
! Fixed codes for Win keys (Super/Hyper/Menu).
! Fixed memory leak, when deallocation palette.
! Fixed palette emulation code bugs.
! Fixed fullscreen and hwsurface handling.
! Fixed CLOSE button bug. First event was passed to the handler, but second terminated the application. Now all events passed to the application correctly.
- Removed all printfs in code, now SDL_SetError used instead of them.
- Disabled ToggleFullScreen function.

README.QNX - updated README.QNX file. Added much more issues.
slouken@380
     1
README by Mike Gorchak <mike@malva.ua>, <lestat@i.com.ua>
slouken@663
     2
Last changed at 29 Jul 2003.
slouken@663
     3
slouken@663
     4
=========================================================================
slouken@663
     5
OpenGL:
slouken@266
     6
slouken@309
     7
    OpenGL in window mode  works well  and  stable, in fullscreen
slouken@663
     8
mode too, but fullscreen mode has not been heavily tested yet.
slouken@663
     9
    If you have QNX RtP version 6.1.0 and above you must download
slouken@663
    10
new Photon3D runtime from http://developers.qnx.com or install it
slouken@663
    11
from public repository or from public CD, available with QNX. The
slouken@663
    12
versions of OS before 6.1.0 are not supported.
slouken@663
    13
    While  creating  OpenGL  context  software  renderer  mode is
slouken@663
    14
artificially selected (QSSL  made  acceleration  only for  Voodoo
slouken@663
    15
boards in fullscreen mode, sorry but I  don't have  this board to
slouken@663
    16
test OpenGL - maybe it work or maybe not :)). If you want accele-
slouken@663
    17
ration - you may remove some line in source code: find  the  file
slouken@663
    18
SDL_ph_video.c and remove the following
slouken@279
    19
slouken@663
    20
    OGLAttrib[OGLargc++]=PHOGL_ATTRIB_FORCE_SW;
slouken@663
    21
     
slouken@663
    22
line in the ph_SetupOpenGLContext() function or  change  argument
slouken@663
    23
to the PHOGL_ATTRIB_FORCE_HW or PHOGL_ATTRIB_FAVOR_HW.
slouken@266
    24
slouken@663
    25
=========================================================================
slouken@663
    26
Wheel and multibutton mouses:
slouken@663
    27
slouken@663
    28
    Photon emitting keyboard events (key up and down) when  moved
slouken@663
    29
mouse wheel. But key_scan field appears valid according to flags,
slouken@663
    30
and it contain zero. It is base method of detecting  mouse  wheel
slouken@663
    31
events under photon. It looks like a hack, but it works for me :)
slouken@663
    32
on different PC configurations.
slouken@663
    33
slouken@663
    34
I'm tested it on:
slouken@663
    35
slouken@663
    36
1. Genius Optical NetScroll/+ (1 wheel)
slouken@663
    37
2. A4Tech Optical GreatEye WheelMouse, model: WOP-35. (2 wheels +
slouken@663
    38
   2 additional buttons). Wheel for vertical scrolling  works  as
slouken@663
    39
   usual, but second wheel for horizontal scrolling emitting  two
slouken@663
    40
   consequented events up or down, so it can  provide  more  fast
slouken@663
    41
   scrolling then the  first  wheel. Additional  buttons  doesn't
slouken@663
    42
   emitting any events, but its look like  handled by  photon  in
slouken@663
    43
   unusual way - like click to front, but works not with any win-
slouken@663
    44
   dow, looks like bug-o-feature :).
slouken@663
    45
slouken@663
    46
=========================================================================
slouken@663
    47
CDROM handling issues:
slouken@663
    48
slouken@663
    49
    Access to CDROM can be provided only with 'root'  previleges.
slouken@663
    50
I can't do anything with this fact. /dev/cd0 have  the brw-------
slouken@663
    51
flags and root:root rights.
slouken@663
    52
slouken@663
    53
=========================================================================
slouken@663
    54
Video Overlays:
slouken@663
    55
slouken@663
    56
    Overlays can flickering during the window movement, resizing,
slouken@663
    57
etc. It happens because photon driver  updates  the  real  window
slouken@663
    58
contents behind the overlay, then draws the temporary  chroma key
slouken@663
    59
color over window contents. It can be done without the chroma key
slouken@663
    60
using but it cause overlay will be  always  on top. So flickering
slouken@663
    61
during the movement much better in that case.
slouken@663
    62
    Double buffering code temporary disabled in the photon driver
slouken@663
    63
code, beacuse on my GF2-MX it  cause  accidently  buffer  switch,
slouken@663
    64
which going to the old frame showing. S3 Savage3D have  the  same
slouken@663
    65
problem, but ATI Rage 128 has not this problem. I think it can be
slouken@663
    66
fixed later. Current code works very fine, so maybe double buffe-
slouken@663
    67
ring is not needed right now.
slouken@663
    68
    Something strange appears when you tried to move window  with
slouken@663
    69
overlay beyond the left border of the screen. Overlay  trying  to
slouken@663
    70
stay at position x=0, but when tried to move  it  a  bit  more it
slouken@663
    71
jumps  at  posituin  x=-60. Really  strange, looks  like  overlay
slouken@663
    72
doesn't love the negotive coordinates.
slouken@663
    73
slouken@663
    74
=========================================================================
slouken@663
    75
Shared library building:
slouken@663
    76
slouken@663
    77
    Shared  library can be  built, but before  running autogen.sh
slouken@663
    78
script you  need  manually  delete  the  libtool  m4  stuff  from
slouken@663
    79
the acinclude.m4 file (it comes after ESD  detection  code  up to
slouken@663
    80
end of the file). Because libtool stuff in the  acinclude.m4 file
slouken@663
    81
very old and doesn't know anything about the QNX. Just  remove it
slouken@663
    82
and run autogen.sh script.
slouken@663
    83
slouken@663
    84
=========================================================================
slouken@266
    85
Some building issues:
slouken@266
    86
slouken@663
    87
    Feel free to not pass --disable-shared option  to  configure,
slouken@663
    88
if you read comment above about 'Shared library building'. Other-
slouken@663
    89
wise this option is strongly  recomended, because  the sdl-config
slouken@663
    90
script will be unfunctional.
slouken@663
    91
slouken@266
    92
    Run configure script without x11 support, e.g.:
slouken@266
    93
slouken@279
    94
    a) for OpenGL support:
slouken@279
    95
    ./configure --prefix=/usr/local \
slouken@279
    96
                --disable-video-x11 \
slouken@279
    97
                --disable-shared
slouken@279
    98
slouken@291
    99
    b) without OpenGL support:
slouken@279
   100
    ./configure --prefix=/usr/local \
slouken@279
   101
                --disable-video-x11 \
slouken@279
   102
                --disable-shared    \
slouken@279
   103
                --disable-video-opengl
slouken@266
   104
slouken@320
   105
    In test directory  also run  ./configure  script  without x11
slouken@320
   106
support, e.g.:
slouken@266
   107
slouken@266
   108
    ./configure  --with-sdl-prefix=/usr/local      \
slouken@266
   109
                 --with-sdl-exec-prefix=/usr/local \
slouken@266
   110
                 --prefix=/usr/local --without-x
slouken@279
   111
slouken@663
   112