Check glGetError() in rendering loop

For investigating https://github.com/iceiix/steven/issues/5
No errors seen
This commit is contained in:
ice_iix 2018-10-07 13:53:50 -07:00
parent ed5d48f136
commit edbed5e319
2 changed files with 15 additions and 0 deletions

View File

@ -855,6 +855,19 @@ pub fn check_framebuffer_status() {
}
}
pub fn check_gl_error() {
unsafe {
loop {
let err = gl::GetError();
if err == gl::NO_ERROR {
break
}
println!("glGetError = {}", err);
}
}
}
impl Framebuffer {
pub fn new() -> Framebuffer {
let mut fb = Framebuffer(0);

View File

@ -379,6 +379,8 @@ impl Renderer {
self.ui.tick(width, height);
gl::check_gl_error();
self.frame_id = self.frame_id.wrapping_add(1);
}