mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-22 08:17:40 +03:00
Undo unnecessary color type change
This commit is contained in:
parent
0d46835135
commit
202cba9f81
@ -3,7 +3,6 @@
|
||||
use crate::rect::Rect;
|
||||
use crate::util::size_of_slice;
|
||||
use crate::vertex::Vertex;
|
||||
use cgmath::Vector3;
|
||||
use wgpu::util::{BufferInitDescriptor, DeviceExt};
|
||||
|
||||
pub struct QuadBufferBuilder {
|
||||
@ -28,7 +27,7 @@ impl QuadBufferBuilder {
|
||||
coords.y - rect.height,
|
||||
coords.x + rect.width,
|
||||
coords.y,
|
||||
rect.color.into(),
|
||||
rect.color,
|
||||
)
|
||||
}
|
||||
|
||||
@ -38,7 +37,7 @@ impl QuadBufferBuilder {
|
||||
min_y: f32,
|
||||
max_x: f32,
|
||||
max_y: f32,
|
||||
color: Vector3<f32>,
|
||||
color: [f32; 3]
|
||||
) -> Self {
|
||||
self.vertex_data.extend(&[
|
||||
Vertex {
|
||||
|
@ -1,12 +1,12 @@
|
||||
// Taken from https://github.com/sotrh/learn-wgpu
|
||||
// by Benjamin Hansen, licensed under the MIT license
|
||||
use cgmath::{Vector2, Vector3};
|
||||
use cgmath::{Vector2};
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Vertex {
|
||||
#[allow(dead_code)]
|
||||
pub position: Vector2<f32>,
|
||||
pub color: Vector3<f32>,
|
||||
pub color: [f32; 3],
|
||||
}
|
||||
|
||||
unsafe impl bytemuck::Pod for Vertex {}
|
||||
|
Loading…
Reference in New Issue
Block a user