@@ -285,9 +285,10 @@ impl Renderer {
285
285
#[ cfg( feature = "bind_vertex_array_support" ) ]
286
286
if self . gl_version . bind_vertex_array_support ( ) {
287
287
unsafe {
288
- self . vertex_array_object = Some ( gl
289
- . create_vertex_array ( )
290
- . map_err ( |err| format ! ( "Error creating vertex array object: {}" , err) ) ?) ;
288
+ self . vertex_array_object = Some (
289
+ gl. create_vertex_array ( )
290
+ . map_err ( |err| format ! ( "Error creating vertex array object: {}" , err) ) ?,
291
+ ) ;
291
292
gl. bind_vertex_array ( self . vertex_array_object ) ;
292
293
}
293
294
}
@@ -572,7 +573,9 @@ impl TextureMap for SimpleTextureMap {
572
573
#[ inline( always) ]
573
574
fn gl_texture ( & self , imgui_texture : imgui:: TextureId ) -> Option < glow:: Texture > {
574
575
#[ allow( clippy:: cast_possible_truncation) ]
575
- Some ( glow:: NativeTexture ( NonZeroU32 :: new ( imgui_texture. id ( ) as _ ) . unwrap ( ) ) )
576
+ Some ( glow:: NativeTexture (
577
+ NonZeroU32 :: new ( imgui_texture. id ( ) as _ ) . unwrap ( ) ,
578
+ ) )
576
579
}
577
580
}
578
581
@@ -646,7 +649,10 @@ impl GlStateBackup {
646
649
fn post_init ( & mut self , gl : & Context ) {
647
650
#[ allow( clippy:: cast_sign_loss) ]
648
651
unsafe {
649
- gl. bind_texture ( glow:: TEXTURE_2D , to_native_gl ( self . texture , glow:: NativeTexture ) ) ;
652
+ gl. bind_texture (
653
+ glow:: TEXTURE_2D ,
654
+ to_native_gl ( self . texture , glow:: NativeTexture ) ,
655
+ ) ;
650
656
}
651
657
}
652
658
@@ -705,7 +711,10 @@ impl GlStateBackup {
705
711
#![ allow( clippy:: cast_sign_loss) ]
706
712
unsafe {
707
713
gl. use_program ( to_native_gl ( self . program , glow:: NativeProgram ) ) ;
708
- gl. bind_texture ( glow:: TEXTURE_2D , to_native_gl ( self . texture , glow:: NativeTexture ) ) ;
714
+ gl. bind_texture (
715
+ glow:: TEXTURE_2D ,
716
+ to_native_gl ( self . texture , glow:: NativeTexture ) ,
717
+ ) ;
709
718
#[ cfg( feature = "bind_sampler_support" ) ]
710
719
if let Some ( sampler) = self . sampler {
711
720
gl. bind_sampler ( 0 , to_native_gl ( sampler, glow:: NativeSampler ) ) ;
@@ -715,7 +724,10 @@ impl GlStateBackup {
715
724
if let Some ( vao) = self . vertex_array_object {
716
725
gl. bind_vertex_array ( to_native_gl ( vao, glow:: NativeVertexArray ) ) ;
717
726
}
718
- gl. bind_buffer ( glow:: ARRAY_BUFFER , to_native_gl ( self . array_buffer , glow:: NativeBuffer ) ) ;
727
+ gl. bind_buffer (
728
+ glow:: ARRAY_BUFFER ,
729
+ to_native_gl ( self . array_buffer , glow:: NativeBuffer ) ,
730
+ ) ;
719
731
gl. blend_equation_separate (
720
732
self . blend_equation_rgb as _ ,
721
733
self . blend_equation_alpha as _ ,
0 commit comments