Struct GlBackendOptions
pub struct GlBackendOptions {
pub gles_minor_version: Gles3MinorVersion,
pub fence_behavior: GlFenceBehavior,
pub debug_fns: GlDebugFns,
}Expand description
Configuration for the OpenGL/OpenGLES backend.
Part of BackendOptions.
Fields§
§gles_minor_version: Gles3MinorVersionWhich OpenGL ES 3 minor version to request, if using OpenGL ES.
fence_behavior: GlFenceBehaviorBehavior of OpenGL fences. Affects how on_completed_work_done and device.poll behave.
debug_fns: GlDebugFnsControls whether debug functions (glPushDebugGroup, glPopDebugGroup,
glObjectLabel, etc.) are enabled when supported by the driver.
By default (GlDebugFns::Auto), debug functions are automatically
disabled on devices with known bugs (e.g., Mali GPUs can crash in
glPushDebugGroup). Use GlDebugFns::ForceEnabled to override this
behavior, or GlDebugFns::Disabled to disable debug functions entirely.
See also InstanceFlags::DISCARD_HAL_LABELS, which prevents debug
markers and labels from being sent to any backend, but without the
driver-specific bug workarounds provided here.
Implementations§
§impl GlBackendOptions
impl GlBackendOptions
pub fn from_env_or_default() -> GlBackendOptions
pub fn from_env_or_default() -> GlBackendOptions
Choose OpenGL backend options by calling from_env on every field.
See those methods for more information.
pub fn with_env(self) -> GlBackendOptions
pub fn with_env(self) -> GlBackendOptions
Takes the given options, modifies them based on the environment variables, and returns the result.
This is equivalent to calling with_env on every field.
Trait Implementations§
§impl Clone for GlBackendOptions
impl Clone for GlBackendOptions
§fn clone(&self) -> GlBackendOptions
fn clone(&self) -> GlBackendOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more