From b987573e93d0d8398dbbb2cb6312e3ed052ffd89 Mon Sep 17 00:00:00 2001 From: OisinA Date: Fri, 17 Jun 2022 16:07:52 +0100 Subject: [PATCH] Replace main.rs with lib.rs --- docs/intermediate/tutorial10-lighting/README.md | 4 ++-- docs/intermediate/tutorial11-normals/README.md | 2 +- docs/intermediate/tutorial12-camera/README.md | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/intermediate/tutorial10-lighting/README.md b/docs/intermediate/tutorial10-lighting/README.md index 31be971b..2256f256 100644 --- a/docs/intermediate/tutorial10-lighting/README.md +++ b/docs/intermediate/tutorial10-lighting/README.md @@ -27,7 +27,7 @@ Ray/path tracing is often too computationally expensive for most real-time appli Before we can get into that though, we need to add a light to our scene. ```rust -// main.rs +// lib.rs #[repr(C)] #[derive(Debug, Copy, Clone, bytemuck::Pod, bytemuck::Zeroable)] struct LightUniform { @@ -307,7 +307,7 @@ where With that done we can create another render pipeline for our light. ```rust -// main.rs +// lib.rs let light_render_pipeline = { let layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { label: Some("Light Pipeline Layout"), diff --git a/docs/intermediate/tutorial11-normals/README.md b/docs/intermediate/tutorial11-normals/README.md index 5873616b..768d361a 100644 --- a/docs/intermediate/tutorial11-normals/README.md +++ b/docs/intermediate/tutorial11-normals/README.md @@ -594,7 +594,7 @@ where I found a cobblestone texture with a matching normal map and created a `debug_material` for that. ```rust -// main.rs +// lib.rs impl State { async fn new(window: &Window) -> Result { // ... diff --git a/docs/intermediate/tutorial12-camera/README.md b/docs/intermediate/tutorial12-camera/README.md index ffd6a06c..e9edcaf7 100644 --- a/docs/intermediate/tutorial12-camera/README.md +++ b/docs/intermediate/tutorial12-camera/README.md @@ -10,7 +10,7 @@ Once 0.13 comes out I'll port the WGSL code to the new syntax and this example s I've been putting this off for a while. Implementing a camera isn't specifically related to using WGPU properly, but it's been bugging me so let's do it. -`main.rs` is getting a little crowded, so let's create a `camera.rs` file to put our camera code. The first things we're going to put in it are some imports and our `OPENGL_TO_WGPU_MATRIX`. +`lib.rs` is getting a little crowded, so let's create a `camera.rs` file to put our camera code. The first things we're going to put in it are some imports and our `OPENGL_TO_WGPU_MATRIX`. ```rust use cgmath::*; @@ -254,9 +254,9 @@ impl CameraController { } ``` -## Cleaning up `main.rs` +## Cleaning up `lib.rs` -First things first we need to delete `Camera` and `CameraController` as well as the extra `OPENGL_TO_WGPU_MATRIX` from `main.rs`. Once you've done that import `camera.rs`. +First things first we need to delete `Camera` and `CameraController` as well as the extra `OPENGL_TO_WGPU_MATRIX` from `lib.rs`. Once you've done that import `camera.rs`. ```rust mod model;