API referencestd/gpu

std/gpu/opengl/common

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

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/common"

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
dynamic std/dylib/native common.dodo
ptr core/ptr common.dodo

Error

Enum · Source

Why an OpenGL context could not be created or made current.

pub enum Error {
    // The options are outside what OpenGL defines, such as version 0.x.
    InvalidInput,
    // The system's OpenGL or EGL library could not be loaded.
    NoLibrary,
    // No display or device to render on, such as a Linux machine without a
    // GPU driver or Mesa.
    NoDisplay,
    // No pixel format or framebuffer configuration supports OpenGL.
    NoConfig,
    // The driver does not offer the requested OpenGL version or profile.
    Unsupported,
    // Another system call failed, such as making the context current.
    System
}

c_string

Function · Source

The address of a byte inside a NUL-terminated string literal, for C calls.

pub fn c_string(text: &[u8]) -> *const u8

null

Function · Source

pub fn null() -> *mut u8

open_library

Function · Source

Load the library at path, a NUL-terminated name or file path; null when there is none.

pub unsafe fn open_library(path: &[u8]) -> *mut u8

Requires an unsafe context. Follow the source safety preconditions and the linked guide before calling this API.

symbol

Function · Source

The address of the symbol name (NUL-terminated) in library, or 0.

pub unsafe fn symbol(library: *mut u8, name: &[u8]) -> usize

Requires an unsafe context. Follow the source safety preconditions and the linked guide before calling this API.

symbol_at

Function · Source

The same for a name the driver passed as a C string.

pub unsafe fn symbol_at(library: *mut u8, name: *const u8) -> usize

Requires an unsafe context. Follow the source safety preconditions and the linked guide before calling this API.

close_library

Function · Source

pub unsafe fn close_library(library: *mut u8)

Requires an unsafe context. Follow the source safety preconditions and the linked guide before calling this API.

has_word

Function · Source

Whether list, a NUL-terminated, space-separated extension list such as eglQueryString returns, contains name as a whole word.

pub unsafe fn has_word(list: *const u8, name: &[u8]) -> bool

Requires an unsafe context. Follow the source safety preconditions and the linked guide before calling this API.

Search every guide, reference page, and API declaration.