Skip to main content

Interface

Type Alias Interface 

pub type Interface = RCHandle<GrGLInterface>;
Expand description

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.

Aliased Type§

pub struct Interface(/* private fields */);