API referencestd/gpu

std/gpu/opengl/linux

Public declarations, types, methods, and source contracts for std/gpu/opengl/linux.

On this page

Library guide · API index and notation

This page is generated from the bundled library in this checkout. Signatures and adjacent source comments are reproduced below; the linked guide explains usage, storage, failures, and platform support.

import "std/gpu/opengl/linux"

Names used in signatures

Unqualified names denote this package’s types (including other source files in the same package), language built-ins, or generic parameters such as T. Qualified names use the import aliases below. These aliases belong to the library source; import a dependency yourself to use its alias in your program.

Alias Package Source file
common std/gpu/opengl/common linux.dodo
handle std/window/handle linux.dodo
ptr core/ptr linux.dodo

Backend

Struct · Source

pub struct Backend {
    // Private implementation fields omitted.
}

Backend.create

Function · Source

Create a context for OpenGL major.minor, core profile from 3.2, and make it current on the calling thread.

pub fn create(major: u32, minor: u32, debug: bool) -> Backend!common.Error

Backend.create_for_window

Function · Source

Create a context that draws into the X11 window of native, a handle from std/window, and make it current on the calling thread.

pub fn create_for_window(native: &handle.NativeHandle, major: u32, minor: u32, debug: bool) -> Backend!common.Error

Backend.make_current

Function · Source

pub fn make_current(&self) -> void!common.Error

Backend.release_current

Function · Source

Leave the calling thread without a current context.

pub fn release_current(&self)

Backend.is_current

Function · Source

pub fn is_current(&self) -> bool

Backend.swap_buffers

Function · Source

Show the window surface’s back buffer. Unsupported without a window.

pub fn swap_buffers(&self) -> void!common.Error

Backend.set_swap_interval

Function · Source

Wait for interval display refreshes per swap; 0 swaps at once.

pub fn set_swap_interval(&self, interval: i32) -> void!common.Error

Backend.update_surface

Function · Source

X11 window surfaces follow the window’s size by themselves.

pub fn update_surface(&self)

Backend.resolve

Function · Source

The address of an OpenGL command, or 0.

pub fn resolve(&self, name: *const u8) -> usize

Search every guide, reference page, and API declaration.