sw-vsync

Updated: April 19, 2023

Display software-rasterized content

Syntax:

sw-vsync   [-bg_rbga=background_color]
           [-display=display_id]
           [-double-buffer]
           [-format=pixel_format]
           [-frame-limit=frames]
           [-grid]
           [-interval=swap_interval]
           [-pipeline=pipeline]
           [-pos=x,y]
           [-single-buffer]
           [-size=widthxheight]
           [-transparency=transparency_mode]
           [-zorder=zorder]
            

Runs on:

QNX Neutrino

Options:

-bg_rbga=background_color

Set the color and alpha compenent specified by background_color as the background color for the window. The color and alpha component are set using a comma-separated list of integers that consists of the red, green, and blue values of the color, followed by the alpha component. For example, use this string: 0xff,0xff,0x0,0xff, to set the background to yellow and opaque (which is the default).

-display=display_id
Show the events on the display as specified by display_id. You can specify display_id as one of the following:
  • an integer that identifies the display
  • a string that identifies the connection type to the display; acceptable strings are:
    • internal
    • composite
    • svideo
    • YPbPr
    • rgb
    • rgbhv
    • dvi
    • hdmi
    • rgbhv
    • other
Whether by integer or by string, the display that you specify using display_id must be one of the displays that you've configured in the display subsections of the winmgr section in your configuration file (e.g., graphics.conf).

If you don't have any display subsections configured, or if you don't specify the display option, then events uses the default display.

-double-buffer
Use two rendering buffers, while alternating between the two. If this option isn't specified, then sw-vsync uses single buffering.
-format=pixel_format
Set the pixel format, as a string, of the window (default is the pixel format assigned by Screen Graphics Subsystem). The pixel format can be one of the following strings:
  • rgba8888
  • rgbx8888
  • rgba5551
  • rgbx5551
  • rgb565
-frame-limit=frames
Limit the number of frames rendered to the value specified by frame_limit (integer). By default, sw-vsync assumes an unlimited number of frames.
-grid
Display grid lines (40 x 40 pixel).
-interval=swap_interval
Set the swap interval, as an integer (default is 1). The swap interval is the minimum number of vsync periods between image updates.
-pipeline=pipeline_id
Set the pipeline as specified by pipeline_id (integer). If you don't specify this option, sw-vsync uses the pipeline of the framebuffer.

If you use this option, Screen applies the SCREEN_USAGE_OVERLAY usage flag and uses the pipeline specified by pipeline_id.

-pos=x,y
Set the position, using integer x and y coordinates of the viewport (default is 0, 0).
-single-buffer
Use one rendering buffer.
-size=widthxheight
Set the size as specified, using integer values for width and height, of the viewport. The default size is fullscreen.
-transparency=transparency_mode
Set the transparency mode of the window. Valid transparency modes are:
Transparency mode Description
none Default mode; result is an opaque window
test Destination pixels are replaced by source pixels; pixels may be opaque or fully transparent
src Destination pixels are replaced by source pixels, including the alpha channel; window will be blended with contents underneath it
-zorder=zorder
Set the z-order specified by zorder, as an integer, of the window. A z-order of 0 is used if this option isn't specified.

Description:

The sw-vsync binary is a command-line tool that can be used to confirm that screen is running, and software rendering can be used.

To run sw-vsync:

  1. Ensure that screen is running.
  2. Run sw-vsync from a shell.

Examples:

# sw-vsync