pub struct GL;Expand description
Implementations§
Source§impl GL
impl GL
Sourcepub fn poly_mode(mode: PolyMode)
pub fn poly_mode(mode: PolyMode)
Sets polygon rasterisation mode (filled, wireframe, or points).
Sourcepub fn enable_msaa(enable: bool)
pub fn enable_msaa(enable: bool)
Enables or disables multisample anti-aliasing.
Sourcepub fn enable_depth(enable: bool)
pub fn enable_depth(enable: bool)
Enables or disables depth testing.
Sourcepub fn enable_alpha(enable: bool)
pub fn enable_alpha(enable: bool)
Enables or disables alpha blending (SRC_ALPHA, ONE_MINUS_SRC_ALPHA).
Sourcepub fn enable_cull(enable: bool)
pub fn enable_cull(enable: bool)
Enables or disables back-face culling.
Sourcepub fn set_cull_face(face: Cull)
pub fn set_cull_face(face: Cull)
Sets the front face winding order (clockwise or counter-clockwise).
Sourcepub fn set_point_size(size: f32)
pub fn set_point_size(size: f32)
Sets the point size (used with PolyMode::Points).
Sourcepub fn set_wire_width(width: f32)
pub fn set_wire_width(width: f32)
Sets the line width (used with PolyMode::WireFrame).
Sourcepub fn bind_shader(id: u32)
pub fn bind_shader(id: u32)
Binds a shader program (glUseProgram).
Sourcepub fn unbind_shader()
pub fn unbind_shader()
Unbinds the current shader program (binds 0).
Sourcepub fn bind_texture_at(tex_id: u32, slot: u32)
pub fn bind_texture_at(tex_id: u32, slot: u32)
Binds a 2D texture to the given texture unit slot.
Sourcepub fn unbind_texture()
pub fn unbind_texture()
Unbinds the currently bound 2D texture (binds 0).
Sourcepub fn unbind_vao()
pub fn unbind_vao()
Unbinds the current VAO (binds 0).
Sourcepub fn bind_buffer(id: u32)
pub fn bind_buffer(id: u32)
Binds an array buffer (GL_ARRAY_BUFFER).
Sourcepub fn unbind_buffer()
pub fn unbind_buffer()
Unbinds the current array buffer (binds 0).
Sourcepub fn unbind_ebo()
pub fn unbind_ebo()
Unbinds the current element array buffer (binds 0).
Sourcepub fn unbind_ssbo()
pub fn unbind_ssbo()
Unbinds the current SSBO (binds 0).
Auto Trait Implementations§
impl Freeze for GL
impl RefUnwindSafe for GL
impl Send for GL
impl Sync for GL
impl Unpin for GL
impl UnsafeUnpin for GL
impl UnwindSafe for GL
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more