show headset view in monitor window
This commit is contained in:
@@ -14,7 +14,7 @@ pub fn main() {
|
||||
let mut vr = vr::VR::new().expect("VR init");
|
||||
|
||||
let mut window: PistonWindow =
|
||||
WindowSettings::new("Hello Virtual World!", [512; 2])
|
||||
WindowSettings::new("Hello, Britannia!", [1024; 2])
|
||||
.exit_on_esc(true)
|
||||
.vsync(false)
|
||||
.build().expect("Building Window");
|
||||
|
||||
@@ -93,9 +93,7 @@ impl ViewRoot<gfx_device_gl::Device, ColorFormat, DepthFormat> {
|
||||
&buffers.depth);
|
||||
}
|
||||
// draw monitor window
|
||||
window.encoder.update_constant_buffer(&self.trans,
|
||||
&Trans { matrix: *na::Matrix4::one().as_ref() });
|
||||
window.encoder.clear(&window.output_color, [0.1, 0.2, 0.3, 1.0]);
|
||||
window.encoder.clear(&window.output_color, [0.005, 0.005, 0.01, 1.0]);
|
||||
window.encoder.clear_depth(&window.output_stencil, 1.0);
|
||||
scene.render(&mut window.factory,
|
||||
&mut window.encoder,
|
||||
|
||||
Reference in New Issue
Block a user