Compare commits

..

2 Commits

Author SHA1 Message Date
acd7edb9ed Merge remote-tracking branch 'origin/feature/cube' into feature/cube 2023-09-27 22:31:43 +02:00
4e9848226a Merge remote-tracking branch 'origin/feature/cube' into feature/cube
# Conflicts:
#	shaders/shader.wgsl
2023-09-27 22:31:33 +02:00

View File

@ -56,59 +56,3 @@ pub fn create_vertices() -> (Vec<Vertex>, Vec<u16>) {
(vertex_data.to_vec(), index_data.to_vec()) (vertex_data.to_vec(), index_data.to_vec())
} }
// OLD
/*
use std::mem::size_of;
const CUBE_VERTEX_SIZE: usize = size_of::<f32>() * 10;
const CUBE_VERTEX_COUNT: usize = 36;
const CUBE_VERTEX_POS_OFFSET: usize = 0;
const CUBE_VERTEX_COLOR_OFFSET: usize = size_of::<f32>() * 4;
const CUBE_VERTEX_UV_OFFSET: usize = size_of::<f32>() * 8;
const CUBE_VERTICES: [f32; 24] = [
// float4 position, float4 color, float2 uv
1, -1, 1, 1, 1, 0, 1, 1, 0, 1,
-1, -1, 1, 1, 0, 0, 1, 1, 1, 1,
-1, -1, -1, 1, 0, 0, 0, 1, 1, 0,
1, -1, -1, 1, 1, 0, 0, 1, 0, 0,
1, -1, 1, 1, 1, 0, 1, 1, 0, 1,
-1, -1, -1, 1, 0, 0, 0, 1, 1, 0,
1, 1, 1, 1, 1, 1, 1, 1, 0, 1,
1, -1, 1, 1, 1, 0, 1, 1, 1, 1,
1, -1, -1, 1, 1, 0, 0, 1, 1, 0,
1, 1, -1, 1, 1, 1, 0, 1, 0, 0,
1, 1, 1, 1, 1, 1, 1, 1, 0, 1,
1, -1, -1, 1, 1, 0, 0, 1, 1, 0,
-1, 1, 1, 1, 0, 1, 1, 1, 0, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, -1, 1, 1, 1, 0, 1, 1, 0,
-1, 1, -1, 1, 0, 1, 0, 1, 0, 0,
-1, 1, 1, 1, 0, 1, 1, 1, 0, 1,
1, 1, -1, 1, 1, 1, 0, 1, 1, 0,
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