diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/main.rs b/src/main.rs index 8710a21..efe422c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -18,13 +18,10 @@ use engine::input::Extension as InputExtension; use engine::lighting::{AttenuationParams, GlobalLight, PointLight}; use engine::material::{Builder as MaterialBuilder, Flags as MaterialFlags}; use engine::renderer::opengl::Extension as OpenglRendererExtension; -use engine::shader::Program as ShaderProgram; use engine::transform::Position; use engine::vector::Vec3; use engine::window::{ Builder as WindowBuilder, - CreationHint as WindowCreationHint, - CreationHintValue as WindowCreationHintValue, CursorMode, Extension as WindowExtension, Window, @@ -72,7 +69,6 @@ fn main() -> Result<(), Box<dyn Error>> teapot_obj.to_mesh()?, teapot_mat.material, Position::from(Vec3 { x: 1.6, y: 0.0, z: 0.0 }), - ShaderProgram::new()?, )); engine.spawn(( @@ -89,7 +85,6 @@ fn main() -> Result<(), Box<dyn Error>> parse_obj(&read_to_string(Path::new(RESOURCE_DIR).join("cube.obj"))?)? .to_mesh()?, MaterialBuilder::new().ambient(YELLOW * 5.0).build(), - ShaderProgram::new()?, MaterialFlags::builder().use_ambient_color(true).build(), )); @@ -109,12 +104,9 @@ fn main() -> Result<(), Box<dyn Error>> engine.add_extension(OpenglRendererExtension::default()); engine.add_extension( - WindowExtension::new(WindowBuilder::default().creation_hint( - WindowCreationHint::Samples, - WindowCreationHintValue::Number(8), - )) - .window_title("Game") - .window_size(WINDOW_SIZE), + WindowExtension::new(WindowBuilder::default().multisampling_sample_count(8)) + .window_title("Game") + .window_size(WINDOW_SIZE), ); engine.add_extension(FlyCameraExtension(FlyCameraOptions { |