From f61585f85b6c79cccbcff4dd87d8005c05c2d038 Mon Sep 17 00:00:00 2001 From: Mark Hildreth Date: Sat, 30 May 2020 00:02:08 -0400 Subject: [PATCH 1/2] Some small fixes. --- docs/beginner/tutorial3-pipeline/README.md | 4 ++-- docs/beginner/tutorial4-buffer/README.md | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/beginner/tutorial3-pipeline/README.md b/docs/beginner/tutorial3-pipeline/README.md index ea70c93f..24692cb5 100644 --- a/docs/beginner/tutorial3-pipeline/README.md +++ b/docs/beginner/tutorial3-pipeline/README.md @@ -11,7 +11,7 @@ A vertex is a point in 3d space (can also be 2d). These vertices are then bundle -Most modern rendering uses triangles to make simple shapes such as cube, and complex shapes such as person. +Most modern rendering uses triangles to make all shapes, from simple (such as cubes) to complex (such as people). @@ -27,7 +27,7 @@ In order to do that, we're going to need something to do the conversion. Add the ```toml [dependencies] # ... -glsl-to-spirv = "0.1" +cshader = "0.6" ``` We'll use this in a bit, but first let's create the shaders. diff --git a/docs/beginner/tutorial4-buffer/README.md b/docs/beginner/tutorial4-buffer/README.md index 8f182823..ba9a80a9 100644 --- a/docs/beginner/tutorial4-buffer/README.md +++ b/docs/beginner/tutorial4-buffer/README.md @@ -7,7 +7,7 @@ You were probably getting sick of me saying stuff like "we'll get to that when w A buffer is a blob of data on the GPU. A buffer is guaranteed to be contiguous, meaning that all the data is store sequentially in memory. Buffer's generally are used to store simple things like a struct or an array, but it can store more complex stuff such as graph structures like a tree (provided all the nodes are stored together and don't reference anything outside of the buffer). We are going to use buffer's a lot, so let's get started with two of the most important one's: the vertex buffer, and the index buffer. ## The vertex buffer -Previously we've stored vertex data directly in the vertex shader. While that worked fine to get our bootstraps on, it simply won't do longterm. The types of objects we need to draw will vary in size, and recompiling the shader whenever we need to update the model would massively slow down our program. Instead we are going to use buffers to store the vertex data we want to draw. Before we do that though we need to describe what a vertex looks like. We'll do this by creating a new struct. +Previously we've stored vertex data directly in the vertex shader. While that worked fine to get our bootstraps on, it simply won't do long-term. The types of objects we need to draw will vary in size, and recompiling the shader whenever we need to update the model would massively slow down our program. Instead we are going to use buffers to store the vertex data we want to draw. Before we do that though we need to describe what a vertex looks like. We'll do this by creating a new struct. ```rust // main.rs @@ -83,7 +83,6 @@ Self { swap_chain, render_pipeline, vertex_buffer, - hidpi_factor, size, } ``` @@ -324,7 +323,6 @@ Self { // NEW! index_buffer, num_indices, - hidpi_factor, size, } ``` From bd84d927665120cb439e773e98dc2c70f444092f Mon Sep 17 00:00:00 2001 From: Mark Hildreth Date: Sun, 31 May 2020 11:24:54 -0400 Subject: [PATCH 2/2] Fixed name of package --- docs/beginner/tutorial3-pipeline/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/beginner/tutorial3-pipeline/README.md b/docs/beginner/tutorial3-pipeline/README.md index 24692cb5..978ed7ac 100644 --- a/docs/beginner/tutorial3-pipeline/README.md +++ b/docs/beginner/tutorial3-pipeline/README.md @@ -27,7 +27,7 @@ In order to do that, we're going to need something to do the conversion. Add the ```toml [dependencies] # ... -cshader = "0.6" +shaderc = "0.6" ``` We'll use this in a bit, but first let's create the shaders.