Main Content

rendererinfo

Graphics renderer information

Description

info = rendererinfo returns a structure containing the default renderer information for the current MATLAB® session.

example

info = rendererinfo(target) returns a structure containing the renderer information for the target graphics object. Specify target as any type of axes or a standalone visualization. You can also specify an array of n axes or standalone visualizations, in which case info is returned as a 1-by-n structure array.

example

Examples

collapse all

Get the default renderer information for the current session.

info = rendererinfo
info = struct with fields:
    GraphicsRenderer: 'WebGL'
              Vendor: 'Google Inc. (Google)'
             Version: 'WebGL 2.0 (OpenGL ES 3.0 Chromium)'
      RendererDevice: 'ANGLE (Google, Vulkan 1.2.0 (SwiftShader Device (Subzero) (0x0000C0DE)), SwiftShader driver)'
             Details: [1×1 struct]

Create a surface plot of the peaks function.

surf(peaks)

Surface plot of the peaks function

Get the current axes, and then get renderer information for the axes. Your system might return different information.

ax = gca;
info = rendererinfo(ax)
info = 

  struct with fields:

    GraphicsRenderer: 'WebGL'
              Vendor: 'Google Inc. (NVIDIA)'
             Version: 'WebGL 2.0 (OpenGL ES 3.0 Chromium)'
      RendererDevice: 'ANGLE (NVIDIA, NVIDIA Quadro P600 (0x00001CB2) Direct3D11 vs_5_0 ps_5_0, D3D11)'
             Details: [1×1 struct]

Get the driver details.

info.Details
ans = 

  struct with fields:

             HardwareSupportLevel: 'Full'
    SupportsDepthPeelTransparency: 1
       SupportsAlignVertexCenters: 1
        SupportsGraphicsSmoothing: 1
                   MaxTextureSize: 16384
               MaxFrameBufferSize: 16384

Create a heatmap chart and a scatter plot in a figure.

tiledlayout(1,2)
nexttile
h = heatmap(rand(5));
ax1 = nexttile;
scatter(ax1,1:10,rand(1,10))

Heatmap chart next to a scatter plot

Get the renderer information for the heatmap chart and the parent axes of the scatter plot. In this case, info is an array that contains two structures.

info = rendererinfo([h ax1])
info = 

  1×2 struct array with fields:

    GraphicsRenderer
    Vendor
    Version
    RendererDevice
    Details

Index into the array to get the renderer version for the heatmap chart. Your system might return different version information.

info(1).Version
ans =

    'WebGL 2.0 (OpenGL ES 3.0 Chromium)'

Input Arguments

collapse all

Target object, specified as one of the following:

  • Any type of axes, such as an Axes, PolarAxes, or GeographicAxes object.

  • A standalone visualization, such as a heatmap.

  • An array of axes, standalone visualizations, or a combination of them.

Output Arguments

collapse all

Renderer information, returned as a structure that contains information such as the name of the graphics renderer, vendor, and version. The Details field is a nested structure that contains additional details. Both the info structure and the info.Details structure are described in the tables below.

If you specify target as an array of n axes or standalone visualizations, info is returned as a 1-by-n structure array. Each structure in the array corresponds to an element of target.

Info Structure

All systems return these fields.

FieldDescription
GraphicsRenderer

Graphics renderer, returned as one of these values:

  • 'WebGL'

  • 'SwiftShader'

Vendor

Manufacturer of the graphics renderer implementation.

Version

Version of the graphics renderer implementation.

RendererDevice

Device that supports the graphics renderer. If you are using hardware-accelerated graphics, this field is the graphics card model name.

Details

Nested structure that contains additional details, such as the renderer's driver version. For the Painters renderer, this structure is empty.

Details Structure

The Details structure has these fields.

Before R2025a: Some systems return a subset of these fields, depending on the graphics renderer.

FieldDescription
HardwareSupportLevel

Hardware support level, returned as one of these values:

  • 'Full' — MATLAB uses graphics hardware as much as possible to provide advanced graphics features, such as graphics smoothing and aligned vertex centers. Most systems return this value.

  • 'Basic' — MATLAB uses graphics hardware, but some features are disabled.

  • 'None' — MATLAB does not use any graphics hardware.

SupportsDepthPeelTransparency

Depth peel transparency feature support, returned as logical(1) if supported and logical(0) otherwise.

SupportsAlignVertexCenters

Align vertex centers feature support, returned as logical(1) if supported and logical(0) otherwise.

SupportsGraphicsSmoothing

Graphics smoothing feature support, returned as logical(1) if supported and logical(0) otherwise.

MaxTextureSize

Maximum texture size that the renderer supports (in pixels).

MaxFrameBufferSize

Maximum frame buffer size that the renderer supports (in pixels).

Version History

Introduced in R2019a

expand all