rendererinfo
Graphics renderer information
Description
returns a structure
containing the default renderer information for the current MATLAB® session. info
= rendererinfo
returns a structure containing the renderer information for the target graphics object.
Specify info
= rendererinfo(target
)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.
Examples
Default Renderer Information
Get the default renderer information for the current session.
info = rendererinfo
info = struct with fields:
GraphicsRenderer: 'OpenGL Software'
Vendor: 'Brian Paul'
Version: '2.1 Mesa 17.1.3'
RendererDevice: 'Mesa X11'
Details: [1x1 struct]
Information About Axes
Create a surface plot of the peaks
function.
surf(peaks)
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: 'OpenGL Hardware' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 391.58' RendererDevice: 'Quadro P600/PCIe/SSE2' Details: [1×1 struct]
Get the driver details.
info.Details
ans = struct with fields: RendererDriverVersion: '23.21.13.9174' RendererDriverReleaseDate: '2018-6-4' HardwareSupportLevel: 'Full' SupportsDepthPeelTransparency: 1 SupportsAlignVertexCenters: 1 SupportsGraphicsSmoothing: 1 MaxTextureSize: 32768 MaxFrameBufferSize: 32768
Information About Multiple Target Objects
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))
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 = '4.6.0 NVIDIA 391.74'
Input Arguments
target
— Target object
axes | standalone visualization | array of axes or standalone visualizations
Target object, specified as one of the following:
Any type of axes, such as an
Axes
,PolarAxes
, orGeographicAxes
object.A standalone visualization, such as a
heatmap
.An array of axes, standalone visualizations, or a combination of them.
Output Arguments
info
— Renderer information
structure
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.
Field | Description |
---|---|
GraphicsRenderer | Graphics renderer, returned as one of these values:
|
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
Some systems return a subset of these fields, depending on the graphics renderer.
For the Painters renderer, the info.Details
structure is
empty.
Field | Description |
---|---|
RendererDriverVersion | Version of the OpenGL® driver. This field displays only on Windows® systems running hardware-accelerated OpenGL. This field does not display on virtual machines. |
RendererDriverReleaseDate | Release date of the OpenGL driver. This field displays only on Windows systems running hardware-accelerated OpenGL. This field does not display on virtual machines. |
HardwareSupportLevel | Hardware support level, returned as one of these values:
If MATLAB detects an unsupported driver, this field also contains
|
SupportsDepthPeelTransparency | Depth peel transparency feature support, returned as
|
SupportsAlignVertexCenters | Align vertex centers feature support, returned as
|
SupportsGraphicsSmoothing | Graphics smoothing feature support, returned as
|
MaxTextureSize | Maximum texture size that the renderer supports (in pixels). |
MaxFrameBufferSize | Maximum frame buffer size that the renderer supports (in pixels). |
More About
Advanced Graphics Features
Advanced graphics features are features that require certain renderer
implementations. These features are graphics smoothing, depth peel transparency, align vertex centers, and hardware-accelerated markers. You
can tell whether your system supports some or all of these features by getting the value of
the HardwareSupportLevel
field of the info.Details
structure.
This table lists the advanced graphics features and the circumstances under which they are supported. In some cases, certain features are supported, but they are disabled to avoid graphics display issues.
Graphics Feature | Hardware OpenGL | Basic Hardware OpenGL | Software OpenGL on Windows | Software OpenGL on Linux® | WebGL |
---|---|---|---|---|---|
Graphics Smoothing | Supported for OpenGL 2.1 or higher | Supported for OpenGL 2.1 or higher | Not supported | Not supported | Supported |
Depth Peel Transparency | Supported for OpenGL 2.1 or higher | Disabled | Not supported | Supported | Supported |
Align Vertex Centers | Supported for OpenGL 2.1 or higher | Disabled | Not supported | Not supported | Supported |
Hardware-accelerated markers | Supported for OpenGL 4.0 or higher | Disabled | Not supported | Not supported | Supported |
Graphics Smoothing
Graphics smoothing improves the appearance of plots by reducing jagged
lines. By default, this feature is enabled if your system supports it. To turn off this
feature for a particular figure, set the GraphicsSmoothing
property
of the figure to 'off'
.
This table shows the difference when the feature is enabled or disabled.
When Supported and Enabled | When Not Supported or Disabled |
---|---|
|
|
(Zoomed-in view)
| (Zoomed-in view)
|
Depth Peel Transparency
Depth peel transparency is a feature for correctly drawing semitransparent 3-D objects or plots that contain intersecting semitransparent objects. In the table, the left image shows the result of using transparency on a sphere when the depth peel transparency feature is supported. The right image shows the same sphere with unexpected shaded areas that occur when the feature is not supported.
When Supported | When Not Supported |
---|---|
|
|
Align Vertex Centers
Align vertex centers is a feature for sharp vertical and horizontal
lines. If graphics smoothing is enabled, horizontal and vertical lines might be uneven in
thickness or color. The align vertex centers feature eliminates the uneven appearance. By
default, the align vertex centers feature is not enabled. However, if your system supports
this feature, then you can turn it on for objects that have an
AlignVertexCenters
property by setting the property to
'on'
.
This table shows the difference when the feature is enabled or disabled.
When Supported and Enabled | When Not Supported or Disabled |
---|---|
|
|
Hardware-Accelerated Markers
Hardware-accelerated markers take advantage of your graphics hardware for improved performance and quality. This table shows the difference when the feature is supported or not supported.
When Supported | When Not Supported |
---|---|
|
|
Tips
Painters is an alternate rendering method for screen display and printing. For more information, see the
Renderer
property of the figure.By default, MATLAB tries to use hardware-accelerated graphics if your graphics hardware supports it. However, in some cases, MATLAB automatically switches to a software implementation if it detects one of these situations:
You are using a graphics driver with known issues or graphics virtualization.
A previous MATLAB session crashed due to a graphics issue. If the previous session was using software OpenGL and crashed, then subsequent sessions use a more stable version of software OpenGL that has fewer capabilities.
Your system does not have the necessary graphics hardware.
Version History
Introduced in R2019aR2022a: Added support for calling rendererinfo
without input arguments
Call the rendererinfo
function without any arguments to query the default graphics renderer information. This new
syntax allows you to call the rendererinfo
function in a way that is
consistent with the opengl
syntax.
R2019a: Recommended over opengl
rendererinfo
can provide renderer information for a specific axes
or standalone visualization, and it can report information about the WebGL renderer. The opengl
function does not provide these
features.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)