Removed debug and draw objects from both sides by removing culling
This commit is contained in:
parent
7257b0a648
commit
5a680e73f0
@ -64,11 +64,9 @@ impl<'a> ApplicationHandler for StateApplication<'a> {
|
|||||||
self.state.as_mut().unwrap().render().unwrap();
|
self.state.as_mut().unwrap().render().unwrap();
|
||||||
}
|
}
|
||||||
WindowEvent::KeyboardInput { event, .. } => {
|
WindowEvent::KeyboardInput { event, .. } => {
|
||||||
println!("Keyboard input event: {:?}", event);
|
|
||||||
if let Some(state) = self.state.as_mut() {
|
if let Some(state) = self.state.as_mut() {
|
||||||
if let Some(input_fn) = self.input_fn.as_mut() {
|
if let Some(input_fn) = self.input_fn.as_mut() {
|
||||||
let key_event = from_winit_input(&event, self.modifiers);
|
let key_event = from_winit_input(&event, self.modifiers);
|
||||||
println!("Keyboard input: {:?}", key_event);
|
|
||||||
input_fn(state, &key_event);
|
input_fn(state, &key_event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -64,7 +64,6 @@ pub struct InputEvent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn from_winit_input(event: &KeyEvent, modifiers: Modifiers) -> InputEvent {
|
pub fn from_winit_input(event: &KeyEvent, modifiers: Modifiers) -> InputEvent {
|
||||||
println!("Converting Winit key event: {:?}", event);
|
|
||||||
InputEvent {
|
InputEvent {
|
||||||
key: map_winit_key(&event.logical_key),
|
key: map_winit_key(&event.logical_key),
|
||||||
state: match event.state {
|
state: match event.state {
|
||||||
|
|||||||
@ -224,7 +224,7 @@ impl<'a> State<'a> {
|
|||||||
topology: wgpu::PrimitiveTopology::TriangleList,
|
topology: wgpu::PrimitiveTopology::TriangleList,
|
||||||
strip_index_format: None,
|
strip_index_format: None,
|
||||||
front_face: wgpu::FrontFace::Ccw,
|
front_face: wgpu::FrontFace::Ccw,
|
||||||
cull_mode: Some(wgpu::Face::Back),
|
cull_mode: None,
|
||||||
// Setting this to anything other than Fill requires Features::NON_FILL_POLYGON_MODE
|
// Setting this to anything other than Fill requires Features::NON_FILL_POLYGON_MODE
|
||||||
polygon_mode: wgpu::PolygonMode::Fill,
|
polygon_mode: wgpu::PolygonMode::Fill,
|
||||||
// Requires Features::DEPTH_CLIP_CONTROL
|
// Requires Features::DEPTH_CLIP_CONTROL
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user