pub struct GlContext {
pub version: (u32, u32),
}Expand description
OpenGL ES context
Fields§
§version: (u32, u32)Version (3.0, 3.1, 3.2)
Implementations§
Source§impl GlContext
impl GlContext
pub fn new(version: (u32, u32)) -> Self
Sourcepub fn make_current(&self) -> Result<(), KernelError>
pub fn make_current(&self) -> Result<(), KernelError>
Make context current.
Binds the OpenGL ES context to the current thread. With VirtIO GPU, this is a no-op (single context).
Sourcepub fn swap_buffers(&self) -> Result<(), KernelError>
pub fn swap_buffers(&self) -> Result<(), KernelError>
Swap buffers.
Presents the current framebuffer by flushing the VirtIO GPU scanout if available, otherwise no-op (software rendering).