DM_OGL_PROBE(1)

πŸ“¦ version 7.44.0, in nixpkgs unstable

πŸ’… dm_ogl_probe β€” the vibe check for your GLX era ✨

okay so this is dm_ogl_probe from the BRL-CAD manual, section 1, and bestie it is literally the smallest little diva in the whole toolbox πŸŽ€ it does exactly one thing and it does it silently, like a queen πŸ‘‘


✨ NAME ✨

dm_ogl_probe β€” test whether a usable GLX/OpenGL display environment is actually available, no cap πŸ”πŸ’»


πŸ¦‹ SYNOPSIS πŸ¦‹

dm_ogl_probe [_display_]

🌸 DESCRIPTION 🌸

so dm_ogl_probe is this tiny helper utility that BRL-CAD uses to figure out, at run time, whether an X11 display actually supports a working GLX/OpenGL rendering context. it's the probe that backs the ogl display manager (aka the dm-ogl plugin) β€” like, before BRL-CAD tools such as mged(1) or archer(1) even think about opening an ogl display, you can run this probe to confirm that the necessary GLX visual and context can actually be created. it's giving pre-flight check ✈️✨

the probe takes no flag options. like, zero. none. it optionally accepts a single argument naming the X display to test, and if you omit it, the display named by the DISPLAY environment variable gets used instead 🫢

here's the whole glow-up sequence: dm_ogl_probe opens the display, verifies the GLX extension is present, searches for the deepest RGBA visual that supports OpenGL, creates an OpenGL context and a temporary window, and makes the context current. then it tears everything down and exits. no window is left on screen, and nothing is printed on success β€” the result is communicated entirely through the exit status, which makes this tool perfect for scripts and build/setup logic πŸ”₯ iykyk

the exit status is basically the whole personality, and it indicates the outcome:

  • 0 β€” a usable GLX/OpenGL context was created and made current πŸ‘‘
  • 2 β€” the display could not be opened 😭
  • 3 β€” the X server does not provide the GLX extension πŸ’€
  • 4 β€” no suitable RGBA OpenGL visual was found πŸ™ˆ
  • 5 β€” an OpenGL context could not be created 😬
  • 6 β€” the temporary test window could not be created 🫠
  • 7 β€” the context could not be made current ⚠️
bestie pls remember: silence = success here. if it prints nothing, that's not it ghosting you, that's it slaying πŸ’…

πŸ’– OPTIONS πŸ’–

  • display β€” the X display to probe, in standard X11 form (for example :0, :0.0, or hostname:0). when omitted, the DISPLAY environment variable selects the display ✨

🌈 EXAMPLES 🌈

Example 1. Probe the default display ⭐

dm_ogl_probe; echo $?

tests the display named by DISPLAY and prints the exit status. a printed 0 means an ogl display manager can be opened on this display. iconic behavior honestly πŸŽ€

Example 2. Gate launching an OpenGL session on probe success 🧚

if dm_ogl_probe ":0"; then
    mged -c model.g
else
    echo "GLX/OpenGL not available on :0, falling back" >&2
fi

runs the probe against display :0 and only launches mged(1) when a working GLX/OpenGL context is available, otherwise reporting the failure so a different display manager (such as X or swrast) can be selected. conditional queen behavior πŸ‘‘πŸ”₯


πŸ¦‹ SEE ALSO πŸ¦‹

brlcad(1), mged(1), archer(1), fbserv(1) β€” go read the whole friend group πŸ’œ


⭐ AUTHOR ⭐

BRL-CAD Team 🫢


This software is Copyright (c) 1989-2026 by the United States Government as represented by U.S. Army Research Laboratory. fr fr, that's the real paperwork πŸ—‚οΈβœ¨


πŸ“ BUG REPORTS πŸ“

Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org πŸ“§ don't be shy, tell them everything bestie πŸ’…


and that's the whole page, mwah πŸ’‹ β€” brought to you by the BRL-CAD crew, DM_OGL_PROBE(1), see you in the group chat πŸ¦‹πŸŒŸ

πŸ“¦ where this page comes from