cl11-ray

Graphics and Screen4.0 (8.x)Screen Graphics Subsystem Developer's GuideAPIProgrammingUtilities

Display fragment shader based ray tracer rendered content using OpenCL 1.1

Syntax:

cl11-ray [options]
            

Runs on:

QNX OS

OpenCL options:

-platform=platform_index

Specify the index of the OpenCL platform for rendering. The default is zero (0), which uses the first available platform.

-device=device_index
Specify the index of the OpenCL device on the current platform for rendering. The default is zero (0), which uses the first available platform.
-fastmath= math_mode

Set fast math mode. Chose from the following:

  • 0 - Use math operations that conform to IEEE-754 standards.
  • 1 - Use fast relaxed math mode, which does not conform to IEEE-754 standards. This is the default.

Screen options:

-display=display_id
Specify which display the window will appear on by using display_id. You can specify display_id as one of the following:
  • an integer that identifies the display
  • an ID string that identifies the name of the display (id_string)
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 cl11-ray uses the default display. If the requested display is not found, cl11-ray will exit with an error.

-format=pixel_format

Set the window pixel format. Supported formats are:

  • rgb565 - SCREEN_FORMAT_RGB565
  • rgba5551 - SCREEN_FORMAT_RGBA5551
  • rgbx5551 - SCREEN_FORMAT_RGBX5551
  • rgba8888 - SCREEN_FORMAT_RGBA8888
  • rgbx8888 - SCREEN_FORMAT_RGBX8888
  • bgra8888 - SCREEN_FORMAT_BGRA8888
  • bgrx8888 - SCREEN_FORMAT_BGRX8888
  • rgba1010102 - SCREEN_FORMAT_RGBA1010102
  • rgbx1010102 - SCREEN_FORMAT_RGBX1010102
  • bgra1010102 - SCREEN_FORMAT_BGRA1010102
  • bgrx1010102 - SCREEN_FORMAT_BGRX1010102

The default is the pixel format assigned by the composited windowing system.

-frame-limit=frame_limit
Limit the number of frames rendered to the value specified by frame_limit (integer); after the frame limit is reached, cl11-ray exits. The default is an unlimited number of frames (-1).
-interval=swap_interval

Set the swap interval (default is 1). The swap interval is the minimum number of vsync periods between image updates.

-offscreen

Perform all rendering off-screen.

-pipeline=pipeline_id
Set the pipeline as specified by pipeline_id (integer). If you don't specify this option, cl11-ray 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
Sets the x,y coordinates of the viewport. The default coordinate of 0,0 is used if this option isn't specified.
-size=widthxheight
Set the size as specified, using integer values for width and height in pixels, of the viewport. The default size is fullscreen.
-verbose

Print information to display.

-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 cl11-ray binary is an OpenCL 1.1 based ray tracer that offloads all execution to OpenCL devices. It uses double buffering to utilize zero-copy rendering in the Screen buffer.

You can use two GPUs simultaneously on an NPX i.mx8 platform. To do so, two devices must be specified:
cl11-ray -device=0 -device=1
                

Examples:

cl11-ray
            


Page updated: