remove baseview example pending crate release

This commit is contained in:
Micah Johnston
2020-12-20 13:45:24 -06:00
parent 221e2dcc42
commit 5450c94f45
2 changed files with 0 additions and 45 deletions

View File

@@ -25,4 +25,3 @@ core-foundation = "0.9.1"
[dev-dependencies]
gl = "0.14.0"
winit = "0.22.2"
baseview = { path = "../baseview" }

View File

@@ -1,44 +0,0 @@
use raw_gl_context::{GlConfig, GlContext};
use baseview::{Event, Window, WindowHandler, WindowScalePolicy};
struct Example {
context: GlContext,
}
impl WindowHandler for Example {
fn on_frame(&mut self) {
self.context.make_current();
unsafe {
gl::ClearColor(1.0, 0.0, 1.0, 1.0);
gl::Clear(gl::COLOR_BUFFER_BIT);
}
self.context.swap_buffers();
}
fn on_event(&mut self, _window: &mut Window, event: Event) {
match event {
Event::Mouse(e) => println!("Mouse event: {:?}", e),
Event::Keyboard(e) => println!("Keyboard event: {:?}", e),
Event::Window(e) => println!("Window event: {:?}", e),
}
}
}
fn main() {
let window_open_options = baseview::WindowOpenOptions {
title: "baseview".into(),
size: baseview::Size::new(512.0, 512.0),
scale: WindowScalePolicy::SystemScaleFactor,
};
Window::open_blocking(window_open_options, |window| {
let context = GlContext::create(window, GlConfig::default()).unwrap();
context.make_current();
gl::load_with(|symbol| context.get_proc_address(symbol) as *const _);
Example { context }
});
}