pub struct Capabilities {Show 33 fields
pub supported_glsl_versions: Vec<Version>,
pub version: String,
pub vendor: String,
pub renderer: String,
pub profile: Option<Profile>,
pub debug: bool,
pub forward_compatible: bool,
pub robustness: bool,
pub can_lose_context: bool,
pub release_behavior: ReleaseBehavior,
pub stereo: bool,
pub srgb: bool,
pub depth_bits: Option<u16>,
pub stencil_bits: Option<u16>,
pub internal_formats_textures: HashMap<TextureFormat, FormatInfos, BuildHasherDefault<FnvHasher>>,
pub internal_formats_renderbuffers: HashMap<TextureFormat, FormatInfos, BuildHasherDefault<FnvHasher>>,
pub max_combined_texture_image_units: c_int,
pub max_texture_max_anisotropy: Option<c_float>,
pub max_texture_size: c_int,
pub max_texture_buffer_size: Option<c_int>,
pub max_viewport_dims: (c_int, c_int),
pub max_draw_buffers: c_int,
pub max_patch_vertices: Option<c_int>,
pub max_indexed_atomic_counter_buffer: c_int,
pub max_indexed_shader_storage_buffer: c_int,
pub max_indexed_transform_feedback_buffer: c_int,
pub max_indexed_uniform_buffer: c_int,
pub max_compute_work_group_count: (c_int, c_int, c_int),
pub max_color_attachments: c_int,
pub max_framebuffer_width: Option<c_int>,
pub max_framebuffer_height: Option<c_int>,
pub max_framebuffer_layers: Option<c_int>,
pub max_framebuffer_samples: Option<c_int>,
}Expand description
Represents the capabilities of the context.
Contrary to the state, these values never change.
Fields§
§supported_glsl_versions: Vec<Version>List of versions of GLSL that are supported by the compiler.
An empty list means that the backend doesn’t have a compiler.
version: StringReturns a version or release number. Vendor-specific information may follow the version number.
vendor: StringThe company responsible for this GL implementation.
renderer: StringThe name of the renderer. This name is typically specific to a particular configuration of a hardware platform.
profile: Option<Profile>The OpenGL context profile if available.
The context profile is available from OpenGL 3.2 onwards. None if not supported.
debug: boolThe context is in debug mode, which may have additional error and performance issue reporting functionality.
forward_compatible: boolThe context is in “forward-compatible” mode, which means that no deprecated functionality will be supported.
robustness: boolTrue if out-of-bound access on the GPU side can’t result in crashes.
can_lose_context: boolTrue if it is possible for the OpenGL context to be lost.
release_behavior: ReleaseBehaviorWhat happens when you change the current OpenGL context.
stereo: boolWhether the context supports left and right buffers.
srgb: boolTrue if the default framebuffer is in sRGB.
depth_bits: Option<u16>Number of bits in the default framebuffer’s depth buffer
stencil_bits: Option<u16>Number of bits in the default framebuffer’s stencil buffer
internal_formats_textures: HashMap<TextureFormat, FormatInfos, BuildHasherDefault<FnvHasher>>Informations about formats when used to create textures.
internal_formats_renderbuffers: HashMap<TextureFormat, FormatInfos, BuildHasherDefault<FnvHasher>>Informations about formats when used to create renderbuffers.
max_combined_texture_image_units: c_intMaximum number of textures that can be bound to a program.
glActiveTexture must be between GL_TEXTURE0 and GL_TEXTURE0 + this value - 1.
max_texture_max_anisotropy: Option<c_float>Maximum value for GL_TEXTURE_MAX_ANISOTROPY_EXT.
None if the extension is not supported by the hardware.
max_texture_size: c_intMaximum size of a texture (i.e. GL_MAX_TEXTURE_SIZE)
max_texture_buffer_size: Option<c_int>Maximum size of a buffer texture. None if this is not supported.
max_viewport_dims: (c_int, c_int)Maximum width and height of glViewport.
max_draw_buffers: c_intMaximum number of elements that can be passed with glDrawBuffers.
max_patch_vertices: Option<c_int>Maximum number of vertices per patch. None if tessellation is not supported.
max_indexed_atomic_counter_buffer: c_intNumber of available buffer bind points for GL_ATOMIC_COUNTER_BUFFER.
max_indexed_shader_storage_buffer: c_intNumber of available buffer bind points for GL_SHADER_STORAGE_BUFFER.
max_indexed_transform_feedback_buffer: c_intNumber of available buffer bind points for GL_TRANSFORM_FEEDBACK_BUFFER.
max_indexed_uniform_buffer: c_intNumber of available buffer bind points for GL_UNIFORM_BUFFER.
max_compute_work_group_count: (c_int, c_int, c_int)Number of work groups for compute shaders.
max_color_attachments: c_intMaximum number of color attachment bind points.
max_framebuffer_width: Option<c_int>Maximum width of an empty framebuffer. None if not supported.
max_framebuffer_height: Option<c_int>Maximum height of an empty framebuffer. None if not supported.
max_framebuffer_layers: Option<c_int>Maximum layers of an empty framebuffer. None if not supported.
max_framebuffer_samples: Option<c_int>Maximum samples of an empty framebuffer. None if not supported.