mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-26 12:59:00 +00:00
Remove unnecessary code from basic glow example
This commit is contained in:
parent
bf1675f2a0
commit
bbe598a24d
@ -20,7 +20,6 @@ fn main() {
|
|||||||
|
|
||||||
// OpenGL context from glow
|
// OpenGL context from glow
|
||||||
let gl = glow_context(&window);
|
let gl = glow_context(&window);
|
||||||
unsafe { gl.clear_color(0.05, 0.05, 0.1, 1.0) };
|
|
||||||
|
|
||||||
// OpenGL renderer from this crate
|
// OpenGL renderer from this crate
|
||||||
let mut ig_renderer = imgui_glow_renderer::auto_renderer(gl, &mut imgui_context)
|
let mut ig_renderer = imgui_glow_renderer::auto_renderer(gl, &mut imgui_context)
|
||||||
@ -31,13 +30,6 @@ fn main() {
|
|||||||
event_loop.run(move |event, _, control_flow| {
|
event_loop.run(move |event, _, control_flow| {
|
||||||
*control_flow = glutin::event_loop::ControlFlow::Wait;
|
*control_flow = glutin::event_loop::ControlFlow::Wait;
|
||||||
match event {
|
match event {
|
||||||
glutin::event::Event::NewEvents(_) => {
|
|
||||||
let now = Instant::now();
|
|
||||||
imgui_context
|
|
||||||
.io_mut()
|
|
||||||
.update_delta_time(now.duration_since(last_frame));
|
|
||||||
last_frame = now;
|
|
||||||
}
|
|
||||||
glutin::event::Event::MainEventsCleared => {
|
glutin::event::Event::MainEventsCleared => {
|
||||||
winit_platform
|
winit_platform
|
||||||
.prepare_frame(imgui_context.io_mut(), window.window())
|
.prepare_frame(imgui_context.io_mut(), window.window())
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user