← 返回命令列表

Linux command

glxgears 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Run the gears demo

glxgears

Run in fullscreen mode

glxgears -fullscreen

Print OpenGL renderer information

glxgears -info

Run at specific window size

glxgears -geometry [800x600]

Run with stereo rendering

glxgears -stereo

Run without animation

glxgears -iacknowledgethatthistoolisnotabenchmark

说明

glxgears is an OpenGL demo that renders three rotating gears. It displays frames per second (FPS) in the terminal every 5 seconds, making it commonly used to verify that OpenGL and GPU acceleration are working correctly. The application creates a simple GLX window and renders the classic gears animation using OpenGL. When working properly, modern systems typically show several thousand FPS (capped by vsync to monitor refresh rate when composited, or much higher when unthrottled). The FPS display makes glxgears useful for quick GPU sanity checks: if you see reasonable FPS (hundreds to thousands) and smooth animation, OpenGL acceleration is working. Very low FPS (under 60) may indicate software rendering or driver issues. Despite common use as a "benchmark," glxgears tests very little of modern GPU capabilities. It uses ancient OpenGL features that aren't representative of real application performance.

参数

-display _display_
Specify X display to use.
-info
Print OpenGL renderer and GLX visual information.
-stereo
Enable stereo rendering (requires hardware support).
-fullscreen
Run in fullscreen mode.
-geometry _WxH_
Set window size (width x height).
-iacknowledgethatthistoolisnotabenchmark
Disable animation (for static screenshots).

FAQ

What is the glxgears command used for?

glxgears is an OpenGL demo that renders three rotating gears. It displays frames per second (FPS) in the terminal every 5 seconds, making it commonly used to verify that OpenGL and GPU acceleration are working correctly. The application creates a simple GLX window and renders the classic gears animation using OpenGL. When working properly, modern systems typically show several thousand FPS (capped by vsync to monitor refresh rate when composited, or much higher when unthrottled). The FPS display makes glxgears useful for quick GPU sanity checks: if you see reasonable FPS (hundreds to thousands) and smooth animation, OpenGL acceleration is working. Very low FPS (under 60) may indicate software rendering or driver issues. Despite common use as a "benchmark," glxgears tests very little of modern GPU capabilities. It uses ancient OpenGL features that aren't representative of real application performance.

How do I run a basic glxgears example?

Run `glxgears` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -display _display_ do in glxgears?

Specify X display to use.