← gpu_gl · version 0.3.6
6 public items, in source order. Generated from the registry index, which re-derives them from the package source at publish time — so a signature here is the one that version actually ships.
pub fn table() -> i64
This backend's table, for gpu::open; 0 on a machine it has no window host for. open answers null where the machine has no OpenGL.
pub fn renderer() -> text
The OpenGL renderer of the window opened last through this backend, as its driver names it: "Apple M3 Max", "llvmpipe (LLVM 19.1.7, 256 bits)", "Apple Software Renderer". Empty before a window opened, and in a browser page. A test that measures another backend against this one reads it to know what it measures against.
pub fn checked() -> boolean
Whether this library was built checked (c/checked.sh) and its checks are on. The library as it is published is not, and pays nothing for the checks: faults is then always 0.
A checked build looks at the error OpenGL kept after every call this backend makes of it, turns the driver's own messages on where it has them, and refuses the use of a handle that was released or whose device closed. Each fault is counted and written to stderr with the call it came from. OpenGL takes a wrong call in silence, so this is how a mistake in this backend, or in a shader, is seen. GPU_GL_DEBUG=abort stops the program at the first fault, GPU_GL_DEBUG=0 turns the checks off.
pub fn check(on: boolean)
Turn a checked build's checks off, or on again. Ask before table(): a device opened through a table taken earlier keeps what that table did.
pub fn faults() -> integer
How many faults a checked build has seen in this program.
pub fn check_catches() -> integer
For this library's own tests: release one buffer of the window opened last twice, then give it to a draw, as no program can through gpu, and answer how many faults that added — 2 in a checked build with its checks on (and not set to abort), 0 otherwise.