slouken@886: README.QNX by Mike Gorchak , slouken@886: Last changed at 24 Apr 2004. slouken@753: slouken@753: ====================================================================== slouken@753: Table of Contents: slouken@753: slouken@753: 1. OpenGL. slouken@753: 2. Wheel and multi-button mouses. slouken@753: 3. CDROM handling issues. slouken@753: 4. Hardware video overlays. slouken@753: 5. Shared library building. slouken@753: 6. Some building issues. slouken@753: 7. Environment variables. slouken@663: slouken@692: ====================================================================== slouken@821: 1. OpenGL: slouken@266: slouken@692: OpenGL works well and is stable, but fullscreen mode has not been slouken@692: heavily tested yet. slouken@692: If you have QNX RtP version 6.1.0 or above you must download the slouken@692: Photon3D runtime from http://developers.qnx.com or install it from the slouken@886: public repository or from the public CD, available with QNX. OS versi- slouken@886: ons below 6.1.0 are not supported. slouken@692: When creating an OpenGL context, software renderer mode is artifi- slouken@692: cially selected (QSSL made acceleration only for Voodoo boards in slouken@692: fullscreen mode, sorry but I don't have this board to test OpenGL - slouken@692: maybe it works or maybe not :)). If you want acceleration - you can slouken@753: remove one line in the source code: find the file SDL_ph_image.c and slouken@692: remove the following slouken@279: slouken@663: OGLAttrib[OGLargc++]=PHOGL_ATTRIB_FORCE_SW; slouken@663: slouken@692: line in the ph_SetupOpenGLContext() function or change the argument to slouken@692: PHOGL_ATTRIB_FORCE_HW or PHOGL_ATTRIB_FAVOR_HW. slouken@266: slouken@692: ====================================================================== slouken@821: 2. Wheel and multi-button mouses: slouken@663: slouken@886: Photon emits keyboard events (key up and down) when the mouse slouken@692: wheel is moved. The key_scan field appears valid, and it contains zero. slouken@692: That is a basic method of detecting mouse wheel events under Photon. slouken@886: It looks like a hack, but it works for me :) on various PC configura- slouken@692: tions. slouken@663: slouken@692: I've tested it on: slouken@663: slouken@886: 1. Genius Optical NetScroll/+ PS/2 (1 wheel) slouken@886: 2. A4Tech Optical GreatEye WheelMouse PS/2, model: WOP-35. (2 wheels slouken@886: + 2 additional buttons). The wheel for vertical scrolling works as slouken@886: usual, but the second wheel for horizontal scrolling emits two se- slouken@886: quential events up or down, so it can provide faster scrolling than slouken@886: the first wheel. Additional buttons don't emit any events, but it slouken@886: looks like they're handled by photon in an unusual way - like click slouken@886: to front, but works not with any window, looks like a fun bug-o-fe- slouken@886: ature :). slouken@663: slouken@692: ====================================================================== slouken@821: 3. CDROM handling issues: slouken@663: slouken@692: Access to CDROM can only be provided with 'root' privileges. I slouken@692: can't do anything about that, /dev/cd0 has brw------- permissions and slouken@692: root:root rights. slouken@663: slouken@692: ====================================================================== slouken@821: 4. Hardware video overlays: slouken@663: slouken@692: Overlays can flicker during window movement, resizing, etc. It slouken@692: happens because the photon driver updates the real window contents be- slouken@692: hind the overlay, then draws the temporary chroma key color over the slouken@692: window contents. It can be done without using the chroma key but that slouken@692: causes the overlay to always be on top. So flickering during window slouken@692: movement is preferred instead. slouken@692: Double buffering code is temporarily disabled in the photon driver slouken@692: code, because on my GF2-MX it can accidentally cause a buffer switch, slouken@692: which causes the old frame to show. S3 Savage4 has the same problem, slouken@692: but ATI Rage 128 doesn't. I think it can be fixed later. Current code slouken@692: works very well, so maybe double buffering is not needed right now. slouken@692: Something strange happens when you try to move the window with the slouken@692: overlay beyond the left border of the screen. The overlay tries to slouken@692: stay at position x=0, but when attempting to move it a bit more it slouken@692: jumps to position x=-60 (on GF2-MX, on ATI Rage128 this value a bit slouken@692: smaller). It's really strange, looks like the overlay doesn't like slouken@692: negative coordinates. slouken@663: slouken@692: ======================================================================= slouken@821: 5. Shared library building: slouken@663: slouken@692: A shared library can be built, but before running the autogen.sh slouken@692: script you must manually delete the libtool.m4 stuff from the acinclu- slouken@692: de.m4 file (it comes after the ESD detection code up to the end of the slouken@821: file), because the libtool stuff in the acinclude.m4 file was very old slouken@821: in SDL distribution before the version 1.2.7 and doesn't knew anything slouken@886: about QNX. SDL 1.2.7 distribution contains the new libtool.m4 script, slouken@753: but anyway it is broken :), Just remove it, then run "libtoolize slouken@886: --force --copy", delete the file aclocal.m4 if it is exists and after slouken@886: that run the autogen.sh script. SDL 1.2.8 contains fixed libtool.m4, slouken@886: ltmain.sh and config.sub files, so you can just run the autogen.sh slouken@886: script. slouken@663: slouken@692: ====================================================================== slouken@821: 6. Some building issues: slouken@266: slouken@692: Feel free to not use the --disable-shared configure option if you' slouken@692: ve read the above comment about 'Shared library building'. Otherwise slouken@692: this option is strongly recommended, as without it the sdl-config slouken@692: script will be broken. slouken@663: slouken@692: Run the configure script without x11 support, e.g.: slouken@266: slouken@279: a) for OpenGL support: slouken@886: ./configure --prefix=/usr \ slouken@886: --disable-video-x11 \ slouken@279: --disable-shared slouken@279: slouken@291: b) without OpenGL support: slouken@886: ./configure --prefix=/usr \ slouken@886: --disable-video-x11 \ slouken@886: --disable-shared \ slouken@279: --disable-video-opengl slouken@266: slouken@886: And of course dont forget to specify --disable-debug, which is on slouken@886: by default, to disable debug and enable the expensive optimizations. slouken@886: slouken@692: In the test directory also run the ./configure script without slouken@692: x11 support, e.g.: slouken@266: slouken@692: ./configure --with-sdl-prefix=/usr \ slouken@692: --with-sdl-exec-prefix=/usr \ slouken@692: --prefix=/usr --without-x slouken@753: slouken@753: ====================================================================== slouken@821: 7. Environment variables: slouken@753: slouken@753: Please note that the photon driver is sensible to the following slouken@753: environmental variables: slouken@753: slouken@886: * SDL_PHOTON_FULLSCREEN_REFRESH - this environment variable controls slouken@886: the refresh rate in all fullscreen modes. Be carefull !!! Photon slouken@886: drivers usually do not checking the maximum refresh rate, which video slouken@886: adapter or monitor supports. slouken@821: slouken@753: * SDL_VIDEO_WINDOW_POS - can be set in the "X,Y" format. If X and Y slouken@753: coordinates are bigger than the current desktop resolution, then win- slouken@753: dow positioning across virtual consoles is activated. If X and Y are slouken@753: smaller than the desktop resolution then window positioning in the slouken@753: current console is activated. The word "center" can be used instead of slouken@753: coordinates, it produces the same behavior as SDL_VIDEO_CENTERED slouken@753: environmental variable. slouken@753: slouken@753: * SDL_VIDEO_CENTERED - if this environmental variable exists then the slouken@753: window centering is perfomed in the current virtual console. slouken@753: slouken@886: Notes: The SDL_VIDEO_CENTERED enviromental variable has greater pri- slouken@886: ority than the SDL_VIDEO_WINDOW_POS in case if both variables are sup- slouken@886: plied to the application.