File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,7 @@ impl EntityListPanel {
116116 t. height as i32 ,
117117 & d,
118118 glow:: RGBA ,
119+ t. flags ,
119120 ) ;
120121 frames. push ( handle) ;
121122 }
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ pub unsafe fn load_texture(
4343 height : i32 ,
4444 data : & [ u8 ] ,
4545 format : u32 ,
46+ flags : u32 ,
4647) -> glow:: Texture {
4748 let texture = gl. create_texture ( ) . unwrap ( ) ;
4849 gl. bind_texture ( glow:: TEXTURE_2D , Some ( texture) ) ;
@@ -62,6 +63,22 @@ pub unsafe fn load_texture(
6263 gl. tex_parameter_i32 ( glow:: TEXTURE_2D , glow:: TEXTURE_WRAP_S , glow:: REPEAT as i32 ) ;
6364 gl. tex_parameter_i32 ( glow:: TEXTURE_2D , glow:: TEXTURE_WRAP_T , glow:: REPEAT as i32 ) ;
6465
66+ // TODO: Bitflags
67+ if ( flags & 0x100000 ) != 0 {
68+ gl. tex_parameter_i32 (
69+ glow:: TEXTURE_2D ,
70+ glow:: TEXTURE_WRAP_S ,
71+ glow:: CLAMP_TO_EDGE as i32 ,
72+ ) ;
73+ }
74+ if ( flags & 0x200000 ) != 0 {
75+ gl. tex_parameter_i32 (
76+ glow:: TEXTURE_2D ,
77+ glow:: TEXTURE_WRAP_T ,
78+ glow:: CLAMP_TO_EDGE as i32 ,
79+ ) ;
80+ }
81+
6582 gl. generate_mipmap ( glow:: TEXTURE_2D ) ;
6683
6784 texture
You can’t perform that action at this time.
0 commit comments