mirror of
https://github.com/IllusionMan1212/3dobs.git
synced 2026-10-24 10:12:35 +00:00
feat: basic texture support
- add texture support (ambient, diffuse, specular) - use opacity in fragment shader - calculate normal matrix on cpu for matricies with big determinants
This commit is contained in:
@@ -31,6 +31,7 @@ pub struct State {
|
||||
pub logger: logger::WritableLog,
|
||||
pub settings: Settings,
|
||||
pub fps: f32,
|
||||
pub show_textures: bool
|
||||
}
|
||||
|
||||
impl Default for State {
|
||||
@@ -55,6 +56,7 @@ impl Default for State {
|
||||
logger: logger::WritableLog::default(),
|
||||
settings: Settings::default(),
|
||||
fps: 0.0,
|
||||
show_textures: true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -487,6 +489,8 @@ fn draw_viewport(ui: &imgui::Ui, state: &mut State, texture: u32) {
|
||||
ui.same_line();
|
||||
ui.checkbox("FOV zoom", &mut state.fov_zoom);
|
||||
ui.same_line();
|
||||
ui.checkbox("Show Textures", &mut state.show_textures);
|
||||
ui.same_line();
|
||||
ui.set_next_item_width(150.0);
|
||||
imgui::Drag::new("Camera Speed")
|
||||
.range(1.0, 10000.0)
|
||||
|
||||
Reference in New Issue
Block a user