Skip to content

Commit 1e66ab2

Browse files
committed
make cur
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
1 parent 711fd46 commit 1e66ab2

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

src/platform/egl/context.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ impl Device {
112112
self.egl_display,
113113
egl::NO_SURFACE,
114114
egl::NO_SURFACE,
115-
egl::NO_CONTEXT,
115+
egl_context,
116116
) == egl::FALSE
117117
{
118118
let err = egl.GetError().to_windowing_api_error();
@@ -126,17 +126,14 @@ impl Device {
126126
context::get_proc_address("glGetString")
127127
);
128128
println!("glGetError: {:?}", context::get_proc_address("glGetError"));
129+
println!("glGetError: {:?}", context::get_proc_address("gg"));
129130
let glGetError: extern "C" fn() -> u32 =
130131
unsafe { std::mem::transmute(context::get_proc_address("glGetError")) };
131132
let glGetString: extern "C" fn(u32) -> *const u8 =
132133
unsafe { std::mem::transmute(context::get_proc_address("glGetString")) };
133134
println!("E{:?}", glGetError());
134135
println!("{:?}", glGetString(glow::RENDERER));
135136
println!("E{:?}", glGetError());
136-
println!(
137-
"{:?}",
138-
std::ffi::CStr::from_ptr(glGetString(glow::VERSION) as _)
139-
);
140137
let gl = Gl::from_loader_function(context::get_proc_address);
141138

142139
// Wrap up the EGL context.

src/platform/generic/egl/context.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -517,12 +517,7 @@ pub(crate) unsafe fn create_context(
517517
return Err(Error::ContextCreationFailed(err));
518518
}
519519

520-
if egl.MakeCurrent(
521-
egl_display,
522-
egl::NO_SURFACE,
523-
egl::NO_SURFACE,
524-
egl::NO_CONTEXT,
525-
) == egl::FALSE
520+
if egl.MakeCurrent(egl_display, egl::NO_SURFACE, egl::NO_SURFACE, egl_context) == egl::FALSE
526521
{
527522
let err = egl.GetError().to_windowing_api_error();
528523
return Err(Error::MakeCurrentFailed(err));

0 commit comments

Comments
 (0)