Skip to main content

Module interface

Module interface 

Expand description

The OpenGL function-pointer interface used by crate::gpu::ganesh::DirectContext to make all OpenGL calls.

Type Aliases§

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.