Home
Developer Resources
Technical Articles

QNX Technical Articles

QNX® Momentics® Development Suite 6.3.0 SP1 or SP2 PE and SE Advanced Graphics Technology Development Kit 1.0.0 Release Notes

QNX® Momentics® Development Suite 6.3.0 SP1 or SP2 PE and SE

Date of this edition: December 19, 2005

Target OS: QNX® Neutrino® 6.3.0 SP1 or SP2

Host OS: Microsoft Windows XP SP1 or SP2, 2000 SP4, or NT SP6a; Sun Solaris 7, 8, or 9; QNX® Neutrino® 6.3.0 SP1 or SP2; Linux (Red Hat 8, 9, or Enterprise WS 3 or 4)

Required patches:

  • Coral Driver Patch (Patch ID 94) -- contains updated Fujitsu Coral graphics drivers, Neutrino image library, Font Fusion library and headers, and the monitor process io-display
  • GF Photon Patch (Patch ID 92) -- contains updated io-graphics; required if you want to run both 3D and Photon applications on your target

Note:
  • For information on installing this TDK, see the installation note.
  • For the most up-to-date version of these release notes, log into your myQNX account, and then go to the Download Center area of www.qnx.com.

Contents


Note: Throughout this document, you may see reference numbers associated with particular issues, changes, etc. When corresponding with our Technical Support staff about a given issue, please quote the relevant reference number. You might also find the reference numbers useful for tracking issues as they become fixed.

What's in this TDK?

This TDK contains libraries, binaries, and source code for sample applications for 2D (GF) and 3D (OpenGL-ES) graphics support on Neutrino.

Binary components

These files are installed under $QNX_TARGET/, under the subdirectories for each supported target platform:

  • 3D and 2D libraries for PPCBE, X86, and SHLE under usr/lib
  • example applications, with binaries under bin and source under usr/src.
  • documentation for the Advanced Graphics TDK and Bitstream Font Fusion libraries

TDK support files

  • $QNX_TARGET/install/tdk/3d/version
  • $QNX_TARGET/install/tdk/3d/shiplist
  • $QNX_TARGET/etc/readme/tdk/3d_tdk_rel.html

2D libraries and headers

  • $QNX_TARGET/ppcbe/usr/lib/libgf.a
  • $QNX_TARGET/ppcbe/usr/lib/libgfS.a
  • $QNX_TARGET/ppcbe/usr/lib/libgf_g.a
  • $QNX_TARGET/ppcbe/usr/lib/libgf_gS.a
  • $QNX_TARGET/shle/usr/lib/libgf.a
  • $QNX_TARGET/shle/usr/lib/libgfS.a
  • $QNX_TARGET/shle/usr/lib/libgf_g.a
  • $QNX_TARGET/shle/usr/lib/libgf_gS.a
  • $QNX_TARGET/usr/include/gf/gf.h
  • $QNX_TARGET/usr/include/gf/gf3d.h
  • $QNX_TARGET/usr/include/gf/gf_errno.h
  • $QNX_TARGET/usr/include/gf/gf_rop.h
  • $QNX_TARGET/x86/usr/lib/libgf.a
  • $QNX_TARGET/x86/usr/lib/libgfS.a
  • $QNX_TARGET/x86/usr/lib/libgf_g.a
  • $QNX_TARGET/x86/usr/lib/libgf_gS.a

OpenGL-ES libraries and headers

  • $QNX_TARGET/ppcbe/usr/lib/libGLES_CM.so.1
  • $QNX_TARGET/ppcbe/usr/lib/libGLES_CM.so
  • $QNX_TARGET/ppcbe/usr/lib/libGLES_CL.so
  • $QNX_TARGET/shle/usr/lib/libGLES_CL.so
  • $QNX_TARGET/shle/usr/lib/libGLES_CM.so.1
  • $QNX_TARGET/shle/usr/lib/libGLES_CM.so
  • $QNX_TARGET/usr/share/gles/textures/bw.rgb
  • $QNX_TARGET/usr/share/gles/textures/tilesmall.rgb
  • $QNX_TARGET/usr/share/gles/textures/qnx.rgb
  • $QNX_TARGET/usr/include/GLES/gl.h
  • $QNX_TARGET/usr/include/GLES/egl.h
  • $QNX_TARGET/usr/include/GLES/egltypes.h
  • $QNX_TARGET/x86/usr/lib/libGLES_CL.so
  • $QNX_TARGET/x86/usr/lib/libGLES_CM.so.1
  • $QNX_TARGET/x86/usr/lib/libGLES_CM.so

Pre-compiled example applications and support files

  • $QNX_TARGET/ppcbe/bin/vsync
  • $QNX_TARGET/ppcbe/bin/mthread_render
  • $QNX_TARGET/ppcbe/bin/layer_test
  • $QNX_TARGET/ppcbe/bin/img_decode_mem
  • $QNX_TARGET/ppcbe/bin/img_decode_simple
  • $QNX_TARGET/ppcbe/bin/img_decode_surface
  • $QNX_TARGET/ppcbe/bin/coral-alphalayer
  • $QNX_TARGET/ppcbe/bin/coral-capture
  • $QNX_TARGET/ppcbe/bin/font-test
  • $QNX_TARGET/ppcbe/bin/font-cache
  • $QNX_TARGET/ppcbe/bin/egl-gears
  • $QNX_TARGET/ppcbe/bin/egl-intermix
  • $QNX_TARGET/ppcbe/bin/egl-tunnel
  • $QNX_TARGET/ppcbe/bin/egl-pdemo
  • $QNX_TARGET/shle/bin/vsync
  • $QNX_TARGET/shle/bin/mthread_render
  • $QNX_TARGET/shle/bin/layer_test
  • $QNX_TARGET/shle/bin/img_decode_mem
  • $QNX_TARGET/shle/bin/img_decode_simple
  • $QNX_TARGET/shle/bin/img_decode_surface
  • $QNX_TARGET/shle/bin/coral-alphalayer
  • $QNX_TARGET/shle/bin/coral-capture
  • $QNX_TARGET/shle/bin/font-test
  • $QNX_TARGET/shle/bin/font-cache
  • $QNX_TARGET/shle/bin/egl-gears
  • $QNX_TARGET/shle/bin/egl-intermix
  • $QNX_TARGET/shle/bin/egl-tunnel
  • $QNX_TARGET/shle/bin/egl-pdemo
  • $QNX_TARGET/x86/bin/vsync
  • $QNX_TARGET/x86/bin/mthread_render
  • $QNX_TARGET/x86/bin/layer_test
  • $QNX_TARGET/x86/bin/img_decode_mem
  • $QNX_TARGET/x86/bin/img_decode_simple
  • $QNX_TARGET/x86/bin/img_decode_surface
  • $QNX_TARGET/x86/bin/coral-alphalayer
  • $QNX_TARGET/x86/bin/coral-capture
  • $QNX_TARGET/x86/bin/font-test
  • $QNX_TARGET/x86/bin/font-cache
  • $QNX_TARGET/x86/bin/egl-gears
  • $QNX_TARGET/x86/bin/egl-intermix
  • $QNX_TARGET/x86/bin/egl-tunnel
  • $QNX_TARGET/x86/bin/egl-pdemo

Documentation

  • $QNX_TARGET/usr/help/product/gf/*
  • $QNX_TARGET/usr/src/doc/FF_Ref_Guide.pdf

Source

The Advanced Graphics TDK includes source code and binaries for several sample applications, in an archive file installed as $QNX_TARGET/usr/src/archives/qnx/tdk-3d-src.zip. These applications illustrate various features and functionality provided by the Advanced Graphics TDK.


Note: If you require source code for the Coral graphics driver, please contact your QNX sales representative.

The sample applications are:

gears
OpenGL ES port of the classic Gears demo by Brian Paul
tunnel
Port of the Tunnel demo by David Bucciarelli
pdemo
EGL Pixmap/PBuffer interactive demo
intermix
Demonstrates 2D/3D intermixing on the same surface
layer_test
Illustrates basic layer usage
mthread_render
Demonstrates technique for using multiple threads within the same process space to render using GF
vsync
Demonstrates artifact-free double buffering using vertical synchronization simultaneously among multiple layers
coral-alphalayer
Demonstrates using the alpha layer on Coral-based devices
coral-capture
Demonstrates using video capture on Coral-based devices
font-cache
Demonstrates caching alpha-map glyphs in Coral video memory for improved performance
font-test
Demonstrates font rendering with the FontFusion Engine
img_decode_simple
A basic demonstration of how to decode and display an image. This application also demonstrates format preselection and load-time clipping
img_decode_mem
This application builds on img_decode_simple to demonstrate how to decode from an alternate source, in this case a memory buffer.
img_decode_surface
This application builds on img_decode_simple and demonstrates how to decode directly to a preallocated GF surface.

If you have QNX Momentics PE, you can compile the sample applications using the IDE or the command-line tools; if you have SE, you have to use the command-line tools.

egl_gears

OpenGL ES port of the classic Gears demo by Brian Paul

Usage: egl-gears [-layer=] [-width=] [-height=] [-xpos=] [-ypos=]

-layer=n
The index of the layer to run on
-width=n
The width of the viewport on the targeted layer, in pixels
-height=n
The height of the viewport on the targeted layer, in pixels
-xpos=n
The horizontal position of the viewport on the targeted layer
-ypos=n
The vertical position of the viewport on the targeted layer

Example: egl-gears -layer=3

egl_tunnel

Port of the Tunnel demo by David Bucciarelli

Usage: egl-tunnel [-layer=] [-width=] [-height=] [-xpos=] [-ypos=]

-layer=n
The index of the layer to run on
-width=n
The width of the viewport on the targeted layer, in pixels
-height=n
The height of the viewport on the targeted layer, in pixels
-xpos=n
The horizontal position of the viewport on the targeted layer
-ypos=n
The vertical position of the viewport on the targeted layer

Example: egl-tunnel -layer=3 -width=200 -height=200 -xpos=100 -ypos=100


Note: This application expects to find two texture map images called bw.rgb and tilesmall.rgb in either $QNX_TARGET/usr/share/gles/textures/ or the current directory.

egl_intermix

A demonstration of mixing OpenGL ES and native GF rendering on the same surface.

Usage: egl-intermix [-layer=] [-width=] [-height=] [-xpos=] [-ypos=]

-layer=n
The index of the layer to run on
-width=n
The width of the viewport on the targeted layer, in pixels
-height=n
The height of the viewport on the targeted layer, in pixels
-xpos=n
The horizontal position of the viewport on the targeted layer
-ypos=n
The vertical position of the viewport on the targeted layer

Example: egl-intermix -layer=3 -width=200 -height=200 -xpos=100 -ypos=100


Note: This application expects to find a texture map image called qnx.rgb in either $QNX_TARGET/usr/share/gles/textures/ or the current directory.

egl-pdemo

Demonstrates how to use OpenGL ES Pixmaps and PBuffers with the Graphics Framework.

Usage: egl-pdemo [config]

config
The numeric EGL config ID of the EGL buffer configuration to use.

vsync

An application to demonstrate artifact-free double buffering using vertical synchronization simultaneously among multiple layers.

Usage: vsync [n]

n
The layer to target

Example (Suitable for running on Fujitsu Coral):

vsync 0 &
vsync 1 &
vsync 2 &
vsync 3 &
vsync 4 &
vsync 5

mthread_render

A sample GF application that illustrates multiple threads rendering.

This application renders rectangles to the top and bottom half of the surface using two separate threads. It demonstrates a technique for using multiple threads within the same process space to render using GF.

Usage: mthread_render [-d device] [-l layer_index]

-d device
The name of the GF device to attach to. The device can be an integer specifying the nth device in /dev/io-display (in the order in which they are encountered) where n >= 0, or a full name of the entry in /dev/io-display. The default is the first device found in /dev/io-display.
-l layer_index
The index of layer to render to. Default is the main display layer.

layer_test

A sample GF application that tests basic layering capability, and illustrates basic layer usage.

Usage: layer_test [-d device] [-D disp_index] command args

-d device
The name of the GF device to attach to. The device can be an integer specifying the nth device in /dev/io-display (in the order in which they are encountered) where n >= 0, or a full name of the entry in /dev/io-display. The default is the first device found in /dev/io-display.
-D disp_index
The index of display to use. The default is 0.
command args
The operation. The command can be one of:
  • draw: enable and render a colored rectangle to the layer index specified. For example: draw 0
  • enable: enable the layer index specified by args.
  • disable: disable the layer index specified by args.
  • order: order the layer as specified by args. There must be enough indexes listed to address each of the layers supported by the hardware. For example, on a system with 6 layers: order 0 1 2 3 4 5.

coral-alphalayer

This application demonstrates how to use the alpha layer on a Coral device. Two layers are initialized and set up to display a single, opaque color. Then the alpha layer is set up to enable per-pixel alpha blending between the foreground and background layers.

Usage: coral-alphalayer imagefile

imagefile
A jpeg image which is converted to 8 bits per pixel and used as the alpha map for the alpha layer.

coral-capture

This sample application demonstrates the video capture API. The application is specifically written to run on Coral P and Coral PA reference boards that use the Philips SAA7113 for decoding PAL and NTSC signals, and the Analog Devices AD9883 for decoding VGA signals. You can use this application as a starting point for larger applications requiring video capture functionality using Coral chips. You'll need to modify it to work with decoder chips other than the SAA7113 and the AD9883.

Usage: coral-capture

font-cache

A sample GF application that demonstrates how to cache anti-aliased font glyphs in Coral video memory to improve performance.

Usage: font-cache -f font_file [ -i iterations ] [-cv]

-f font_file
The font file to be used by the FontFusion library
-i iterations
The number of times to repeat the screen drawing (the default is 100).
-c
Locate the alpha map in memory that is faster for CPU access. On most systems, this will affect whether the alpha map will come from system memory, or from dedicated video memory.
-v
Be verbose.

font-test

This sample application demonstrates font rendering with the FontFusion Engine. It renders bitmap and anti-aliased text using a TrueType font.

Usage: font-test -f font [-D device] [-l layer] [-d display] [-v]

-D device
The name of the GF device to attach to. It can be specified as an integer specifying the nth device in /dev/io-display (in the order in which they are encountered) where n >= 0, or a full name of the entry in /dev/io-display. The default is the first device found in /dev/io-display.
-f font
The path to a TrueType font to render
-l layer
he index of the layer to render to. The default is the main display layer.
-d display
he index of the display to enable.
-v
Be verbose.

img_decode_simple

Renders an image from the filesystem to the screen, exercising the decoders and demonstrating a technique for using GF to display images.

Usage: img_decode_simple [-d device] [-D dispno] [-l layer_index] file

-d device
The name of the GF device to attach to. The device can be an integer specifying the nth device in /dev/io-display (in the order in which they are encountered) where n >= 0, or a full name of the entry in /dev/io-display. The default is the first device found in /dev/io-display.
-D dispno
The index of the display to attach to. Default is the first display.
-l
The index of layer to render to. The default is the main display layer.
file
The name of the file to load.

img_decode_mem

Loads an entire image file into memory, then decodes the image from the copy of the file in memory. Exercises the decoders and demonstrates a technique for decoding an image from an alternate source.

Usage: img_decode_mem [-d device] [-D dispno] [-l layer_index] file

-d device
The name of the GF device to attach to. The device can be an integer specifying the nth device in /dev/io-display (in the order in which they are encountered) where n >= 0, or a full name of the entry in /dev/io-display. The default is the first device found in /dev/io-display.
-D dispno
The index of the display to attach to. Default is the first display.
-l
The index of layer to render to. The default is the main display layer.
file
The name of the file to load.

img_decode_surface

Renders an image from the filesystem to the screen, exercising the decoders and demonstrating a technique for using GF to display images.


Note: By default on a Fujitsu Coral card, this application loads the image to a surface with an ARGB1555 format. If the image has ARGB8888 format, the bottom 7 bits of the alpha channel are dropped, affecting alpha blending. Therefore, images with alpha information may render differently than they do with the other img_decode_* sample applications. This also causes transparent colors to be rendered as white.

Usage: img_decode_surface [-d device] [-D dispno] [-l layer_index] file

-d device
The name of the GF device to attach to. The device can be an integer specifying the nth device in /dev/io-display (in the order in which they are encountered) where n >= 0, or a full name of the entry in /dev/io-display. The default is the first device found in /dev/io-display.
-D dispno
The index of the display to attach to. Default is the first display.
-l
The index of layer to render to. The default is the main display layer.
file
The name of the file to load.

Configuration files

The Advanced Graphics TDK installs these configuration files:

  • /etc/system/config/img.conf -- the image loader configuration file. This file is required if you use the image loading library libimg.
  • /etc/system/config/display.conf -- the io-display configuration file.

By default, the software will run on the Fujitsu Coral reference board. To tailor for other boards, you can specify various settings via the Coral configuration file. This configuration file is normally located in /usr/photon/config. Use the environment variable GF_MODEFILE to set the fullpath to the configuration file on the target, for example: GF_MODEFILE=/usr/photon/config/coral.conf ./3D-demo.

Known issues

  • gf_draw_poly_fill() clips one pixel less than it should in some situations. (Ref# 27675)
  • Currently RGB video capture doesn't work with Coral P devices on Motorola MGT 5200 systems. Coral P devices will work on PPC systems that are not MGT 5200-based. This appears to be a hardware issue, and it has been reported to Fujitsu. (Ref# 26367)
  • The install directories created by the Advanced Graphics TDK still use legacy names (3D). (Ref# 28759)
  • Compiling source with gcc versions 3.3.1 or 3.3.5 may result in the following warnings (Ref# 28778):
        /usr/qnx630/target/qnx6/usr/src/archives/qnx/3d/3.3.5/src/apps/gf/img_decode_mem/gf_setup.c:30: warning: implicit declaration of function `memset'
        /usr/qnx630/target/qnx6/usr/src/archives/qnx/3d/3.3.5/src/apps/gf/img_decode_mem/gf_setup.c:195: warning: implicit declaration of function `memcpy'
        /usr/qnx630/target/qnx6/usr/src/archives/qnx/3d/3.3.5/src/apps/gf/img_decode_mem/main.c:70: warning: implicit declaration of function `memset'
        /usr/qnx630/target/qnx6/usr/src/archives/qnx/3d/3.3.5/src/apps/gf/img_decode_mem/gf_setup.c:30: warning: implicit declaration of function `memset'
        /usr/qnx630/target/qnx6/usr/src/archives/qnx/3d/3.3.5/src/apps/gf/img_decode_mem/gf_setup.c:195: warning: implicit declaration of function `memcpy'
        /usr/qnx630/target/qnx6/usr/src/archives/qnx/3d/3.3.5/src/apps/gf/img_decode_mem/main.c:70: warning: implicit declaration of function `memset'
        /usr/qnx630/target/qnx6/usr/src/archives/qnx/3d/3.3.5/src/apps/gf/img_decode_mem/gf_setup.c:30: warning: implicit declaration of function `memset'
        /usr/qnx630/target/qnx6/usr/src/archives/qnx/3d/3.3.5/src/apps/gf/img_decode_mem/gf_setup.c:195: warning: implicit declaration of function `memcpy'
        /usr/qnx630/target/qnx6/usr/src/archives/qnx/3d/3.3.5/src/apps/gf/img_decode_mem/main.c:70: warning: implicit declaration of function `memset'
        /usr/qnx630/target/qnx6/usr/src/archives/qnx/3d/3.3.5/src/apps/gf/img_decode_simple/gf_setup.c:30: warning: implicit declaration of function `memset'
        /usr/qnx630/target/qnx6/usr/src/archives/qnx/3d/3.3.5/src/apps/gf/img_decode_simple/gf_setup.c:195: warning: implicit declaration of function `memcpy'
        /usr/qnx630/target/qnx6/usr/src/archives/qnx/3d/3.3.5/src/apps/gf/img_decode_simple/main.c:29: warning: implicit declaration of function `memset'
        /usr/qnx630/target/qnx6/usr/src/archives/qnx/3d/3.3.5/src/apps/gf/img_decode_simple/gf_setup.c:30: warning: implicit declaration of function `memset'
        /usr/qnx630/target/qnx6/usr/src/archives/qnx/3d/3.3.5/src/apps/gf/img_decode_simple/gf_setup.c:195: warning: implicit declaration of function `memcpy'
        /usr/qnx630/target/qnx6/usr/src/archives/qnx/3d/3.3.5/src/apps/gf/img_decode_simple/main.c:29: warning: implicit declaration of function `memset'
        /usr/qnx630/target/qnx6/usr/src/archives/qnx/3d/3.3.5/src/apps/gf/img_decode_simple/gf_setup.c:30: warning: implicit declaration of function `memset'
        /usr/qnx630/target/qnx6/usr/src/archives/qnx/3d/3.3.5/src/apps/gf/img_decode_simple/gf_setup.c:195: warning: implicit declaration of function `memcpy'
        /usr/qnx630/target/qnx6/usr/src/archives/qnx/3d/3.3.5/src/apps/gf/img_decode_simple/main.c:29: warning: implicit declaration of function `memset'
        /usr/qnx630/target/qnx6/usr/src/archives/qnx/3d/3.3.5/src/apps/gf/img_decode_surface/gf_setup.c:30: warning: implicit declaration of function `memset'
        /usr/qnx630/target/qnx6/usr/src/archives/qnx/3d/3.3.5/src/apps/gf/img_decode_surface/gf_setup.c:195: warning: implicit declaration of function `memcpy'
        /usr/qnx630/target/qnx6/usr/src/archives/qnx/3d/3.3.5/src/apps/gf/img_decode_surface/main.c:74: warning: implicit declaration of function `memset'
        /usr/qnx630/target/qnx6/usr/src/archives/qnx/3d/3.3.5/src/apps/gf/img_decode_surface/gf_setup.c:30: warning: implicit declaration of function `memset'
        /usr/qnx630/target/qnx6/usr/src/archives/qnx/3d/3.3.5/src/apps/gf/img_decode_surface/gf_setup.c:195: warning: implicit declaration of function `memcpy'
        /usr/qnx630/target/qnx6/usr/src/archives/qnx/3d/3.3.5/src/apps/gf/img_decode_surface/main.c:74: warning: implicit declaration of function `memset'
        /usr/qnx630/target/qnx6/usr/src/archives/qnx/3d/3.3.5/src/apps/gf/img_decode_surface/gf_setup.c:30: warning: implicit declaration of function `memset'
        /usr/qnx630/target/qnx6/usr/src/archives/qnx/3d/3.3.5/src/apps/gf/img_decode_surface/gf_setup.c:195: warning: implicit declaration of function `memcpy'
        /usr/qnx630/target/qnx6/usr/src/archives/qnx/3d/3.3.5/src/apps/gf/img_decode_surface/main.c:74: warning: implicit declaration of function `memset'
        /usr/qnx630/target/qnx6/usr/src/archives/qnx/3d/3.3.5/src/apps/gf/layer_test/layer_test.c:164: warning: deprecated use of label at end of compound statement
        /usr/qnx630/target/qnx6/usr/src/archives/qnx/3d/3.3.5/src/apps/gf/layer_test/layer_test.c:164: warning: deprecated use of label at end of compound statement
        /usr/qnx630/target/qnx6/usr/src/archives/qnx/3d/3.3.5/src/apps/gf/layer_test/layer_test.c:164: warning: deprecated use of label at end of compound statement

Documentation

The functionality provided by the Advanced Graphics TDK is described in the QNX Graphics Framework and 3D Developer's Guide, which is installed under $QNX_TARGET/usr/help/product/gf/bookset.html. For information on using the TDK, see:

  • the "Using ..." chapters of the Developer's Guide for a description of using various parts of the Advanced Graphics TDK, including 2D GF and 3D GL-ES functionality
  • the GF API reference in the Developer's Guide for details about all the 2D and 3D functions
  • the image library API reference in the Developer's Guide for details about the image library functions
  • the Bitstream FontFusion 2.4 Reference Guide for information about using the FontFusion API to render fonts, installed under /usr/src/doc/FF_Ref_Guide.pdf.

Technical support

If you have any questions, comments, or problems with a QNX product, please contact Technical Support. For more information, see the How to Get Help chapter of the Welcome to QNX Momentics guide or visit our website, www.qnx.com.