gles2-teapot

Updated: April 19, 2023

Demonstrate 3D rendering using OpenGL ES 2.x

Syntax:

gles2-teapot [-bg-alpha=background_alpha_value]
             [-brightness=brightness]
             [-config=egl_configuration]
             [-contrast=contrast]
             [-display=display_id]    
             [-frame-limit=frames]
             [-hue=hue]
             [-interval=swap_interval]
             [-material=material_id]     
             [-nbuffers=count]
             [-pipeline=pipeline_id]     
             [-pos=x,y]
             [-saturation=saturation]      
             [-size=widthxheight]
             [-tess=tessellation_level]   
             [-transparency=transparency_mode]
             [-verbose]
             [-wireframe]     
             [-zorder=zorder]
           

Runs on:

QNX Neutrino

Options:

-bg-alpha=background_alpha_value

Set the background to the specified alpha value as a float in the range [0.0f..1.0f]. If you don't specify the bg-alpha option, gles2-teapot uses 0.0f.

-brightness=brightness
Set brightness of the window as an integer in the range [-255..255]. If you don't specify this option, gles2-teapot uses a default value based on your display hardware.
-config=egl_configuration

Set optional EGL configuration specifiers. These optional configuration specifiers are set using a comma-separated list. The specifiers may include the following: pixel format and/or multi-sampling specifications, or an EGL configuration number. If you're using an EGL configuration number, it must not be specified with other specifiers.

Pixel format

Specify pixel format as one of the following:

  • rgba1010102 or rgbx1010102
  • bgra1010102 or bgrx1010102
  • rgba8888 or rgbx8888
  • bgra8888 or bgrx8888
  • rgba5551 or rgbx5551
  • rgba4444 or rgbx4444
  • rgb565

where "a" indicates alpha bits and "x" indicates that the alpha bits are ignored.

Sampling

Specify multi-sampling as:

[rate]x

where rate is a valid sampling rate (e.g., 2, 4, 8, ...).

EGL configuration number
Specify as an integer. The integer must be a valid EGL configuration ID (EGL_CONFIG_ID).

For example, the following are all valid ways of specifying the EGL configuation option:

  • -config=rgb565
  • -config=rgba8888,4x
  • -config=12

If no specific EGL configuration is provided, this utility uses the platform-specific EGL configuration. Use egl-configs to determine the the EGL configurations that are supported on your target.

-contrast=contrast
Set contrast of the window in the range [-128..127]. If you don't specify this option, gles2-teapot uses a default value based on your display hardware.
-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
    • 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 the requested display is not found, gles2-teapot will exit with an error.

If you don't have any display subsections configured, or if you don't specify the display option, gles2-teapot uses the default display.

-frame-limit=frames
Limit the number of frames rendered to the value specified by frame_limit (integer); after the frame limit is reached, gles2-teapot exits. By default, this utility assumes an unlimited number of frames (-1).
-hue=hue
Set hue of the window in the range [-128..127]. If you don't specify this option, gles2-teapot uses a default value based on your display hardware.
-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.
-material=material_id

Set the color and material of the rendered teapot. You can select from the following list:

  • 0 — Emerald
  • 1 — Jade
  • 2 — Obsidian
  • 3 — Pearl
  • 4 — Ruby
  • 5 — Turquoise
  • 6 — Brass
  • 7 — Bronze
  • 8 — Chrome
  • 9 — Copper
  • 10 — Gold
  • 11 — Silver
  • 12 — Black plastic
  • 13 — Cyan plastic
  • 14 — Green plastic
  • 15 — Red plastic
  • 16 — White plastic
  • 17 — Yellow plastic
  • 18 — Black rubber
  • 19 — Cyan rubber
  • 20 — Green rubber
  • 21 — Red rubber
  • 22 — White rubber
  • 23 — Yellow rubber

If you don't specify the material option, gles2-teapot uses 15 (red plastic).

-nbuffers=count
Set the number of window buffers to be created for rendering. The default is 2.
-pipeline=pipeline_id
Set the pipeline as specified by pipeline_id (integer). If you don't specify this option, gles2-teapot 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.
-saturation=saturation
Set saturation of the window in the range [-128..127]. If you don't specify this option, gles2-teapot uses a default value based on your display hardware.
-size=widthxheight
Set the size as specified, using integer values for width and height, of the viewport. The default size is fullscreen.
-tess=tessellation_level
Set the tessellation level of the teapot. The minimum level is 1 and the default is 25.
-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
-verbose
Print information to the display.
-wireframe
Render a wireframe teapot instead of a solid teapot.
-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 gles2-teapot binary is a command-line tool that can be used to confirm that screen is running, and that all necessary drivers for OpenGL ES 2.x are in place, and can start successfully.

To invoke gles2-teapot:

  1. Ensure that screen is running.
  2. Run gles2-teapot from either your startup script or from a shell.

Examples:

# gles2-teapot