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:
2023-11-02 04:03:11 +02:00
parent d10f549c83
commit 57d4ecb18a
9 changed files with 190 additions and 181 deletions
+1 -1
View File
@@ -264,7 +264,7 @@ fn main() -> anyhow::Result<(), Box<dyn std::error::Error>> {
} else {
gl::PolygonMode(gl::FRONT_AND_BACK, gl::FILL);
}
if Some(obj.id) == state.active_model {obj.draw(&mesh_shader, state.draw_aabb);}
if Some(obj.id) == state.active_model {obj.draw(&mesh_shader, state.draw_aabb, state.show_textures);}
}
gl::PolygonMode(gl::FRONT_AND_BACK, gl::FILL);