File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
src/backend/renderer/gles Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -1977,16 +1977,15 @@ impl GlesRenderer {
1977
1977
shader : impl AsRef < str > ,
1978
1978
additional_uniforms : & [ UniformName < ' _ > ] ,
1979
1979
) -> Result < GlesTexProgram , GlesError > {
1980
- unsafe {
1981
- self . context . egl ( ) . make_current ( ) ?;
1982
- }
1980
+ let destruction_callback_sender = self . gles_cleanup ( ) . sender . clone ( ) ;
1981
+ let gl = unsafe { self . context . make_current ( ) ? } ;
1983
1982
1984
1983
unsafe {
1985
1984
texture_program (
1986
- & self . context . gl ,
1985
+ & gl,
1987
1986
shader. as_ref ( ) ,
1988
1987
additional_uniforms,
1989
- self . gles_cleanup ( ) . sender . clone ( ) ,
1988
+ destruction_callback_sender ,
1990
1989
)
1991
1990
}
1992
1991
}
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ pub unsafe fn link_program(
115
115
}
116
116
117
117
pub ( super ) unsafe fn texture_program (
118
- gl : & ffi :: Gles2 ,
118
+ gl : & CurrentGlesContext < ' _ > ,
119
119
src : & str ,
120
120
additional_uniforms : & [ UniformName < ' _ > ] ,
121
121
destruction_callback_sender : Sender < CleanupResource > ,
@@ -220,7 +220,7 @@ pub(super) unsafe fn texture_program(
220
220
} ) ) )
221
221
}
222
222
223
- pub ( super ) unsafe fn solid_program ( gl : & ffi :: Gles2 ) -> Result < GlesSolidProgram , GlesError > {
223
+ pub ( super ) unsafe fn solid_program ( gl : & CurrentGlesContext < ' _ > ) -> Result < GlesSolidProgram , GlesError > {
224
224
let program = link_program ( gl, shaders:: VERTEX_SHADER_SOLID , shaders:: FRAGMENT_SHADER_SOLID ) ?;
225
225
226
226
let matrix = c"matrix" ;
You can’t perform that action at this time.
0 commit comments