Skip to main content

Module gl

Module gl 

Expand description

OpenGL types and helpers re-exported from the Ganesh GL backend (see crate::gpu::ganesh::gl).

Structs§

BackendState
A crate::gpu::DirectContext’s cache of backend context state can be partially invalidated. These flags are specific to the GL backend and we’d add a new set for an alternative backend.
FramebufferInfo
SurfaceInfo
TextureInfo
Types for interacting with GL resources created externally to Skia. GrBackendObjects for GL textures are really const GrGLTexture*. The format here should be a sized, internal format for the texture. We will try to use the sized format if the GL Context supports it, otherwise we will internally fall back to using the base internal formats.

Enums§

Format
Standard

Type Aliases§

Enum
Extensions
This helper queries the current GL context for its extensions, remembers them, and can be queried. It supports both glGetString- and glGetStringi-style extension string APIs and will use the latter if it is available. It also will query for EGL extensions if a eglQueryString implementation is provided.
Interface
crate::gpu::ganesh::DirectContext uses the following interface to make all calls into OpenGL. When a crate::gpu::ganesh::DirectContext is created it is given a Self. The interface’s function pointers must be valid for the OpenGL context associated with the crate::gpu::ganesh::DirectContext. On some platforms, such as Windows, function pointers for OpenGL extensions may vary between OpenGL contexts. So the caller must be careful to use a Self initialized for the correct context. All functions that should be available based on the OpenGL’s version and extension string must be non-NULL or crate::gpu::ganesh::DirectContext creation will fail. This can be tested with the Self::validate() method when the OpenGL context has been made current.
UInt