opengl

Selects or queries the OpenGL rendering mode of graphics.

Category: Graphics > Graphics Performance

Syntax

opengl software

Requests software rendering instead of the graphics card.

opengl hardware

Requests hardware-accelerated rendering where available.

opengl info

Prints information about the renderer, vendor and version.

d = opengl('data')

Returns the same information as a struct.

Description

Switching to software rendering is a common workaround for display glitches caused by graphics drivers. The info form is what to include in a bug report about rendering problems.

Input arguments

mode
'software', 'hardware' or 'hardwarebasic' for settings.

Output arguments

d
Struct describing the renderer.

Example

Query the renderer

d = opengl('data');
disp(d.Vendor)
disp(d.GraphicsRenderer)
Output
MatLivre
MatLivre renderer

Notes

MatLivre has its own renderer, so the mode settings are accepted but change nothing. The info reports MatLivre renderer as the renderer and MatLivre as the vendor.

See also

rendererinfo figure get ver