opengl
matlab_compat · scripts/matlab_compat/opengl.m
OPENGL Control and query the OpenGL renderer that draws figures.
opengl info
S = opengl ('info')
D = opengl ('data')
opengl software
opengl hardware
opengl hardwarebasic
opengl info prints the OpenGL implementation behind the current
graphics toolkit: version, vendor, renderer, whether it is a
software renderer, the texture and frame-buffer limits and the
number of extensions. With an output argument the same
information is returned as a struct with the fields Version,
Vendor, Renderer, Software (logical), MaxTextureSize,
MaxFrameBufferSize, SupportsFramebufferObjects and Extensions (a
cell array of extension names); opengl ('data') returns that
struct as well.
The query uses the current figure, or a temporary invisible one
when no figure exists. Only the qt graphics toolkit draws with
OpenGL: with any other toolkit opengl ('info') raises an error.
opengl software, opengl hardware and opengl hardwarebasic are
accepted for compatibility but do not change the renderer: Nexus
takes the renderer from the environment before the first figure
window is created (QT_OPENGL=software, and GALLIUM_DRIVER=llvmpipe
on Windows for Mesa). A warning says so.
s = opengl ('info');
if s.Software
disp (['figures are drawn in software by ' s.Renderer]);
end
See also figure, print, graphics_toolkit.