API referencestd/gpu

std/gpu/opengl/macos

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

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

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 macos.dodo
handle std/window/handle macos.dodo
ptr core/ptr macos.dodo

Backend

Struct · Source

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

Backend.create

Function · Source

Create a context for OpenGL major.minor and make it current on the calling thread. CGL has no debug contexts, so debug is ignored.

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

Backend.create_for_window

Function · Source

Create an NSOpenGLContext drawing into the view of native, a handle from std/window, and make it current on the calling thread, which must be the main thread.

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

Backend.swap_buffers

Function · Source

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

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

Backend.set_swap_interval

Function · Source

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

Backend.update_surface

Function · Source

NSOpenGLContext resizes its drawable only when told to.

pub fn update_surface(&self)

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.resolve

Function · Source

The address of an OpenGL command, or 0. OpenGL.framework exports every command it implements.

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

Search every guide, reference page, and API declaration.