|
| 1 | +mod conversions; |
| 2 | + |
1 | 3 | use crate::{
|
2 | 4 | pipeline::{IndexFormat, PrimitiveTopology, RenderPipelines, VertexFormat},
|
3 | 5 | renderer::{BufferInfo, BufferUsage, RenderResourceContext, RenderResourceId},
|
@@ -174,84 +176,6 @@ impl From<&VertexAttributeValues> for VertexFormat {
|
174 | 176 | }
|
175 | 177 | }
|
176 | 178 |
|
177 |
| -impl From<Vec<f32>> for VertexAttributeValues { |
178 |
| - fn from(vec: Vec<f32>) -> Self { |
179 |
| - VertexAttributeValues::Float(vec) |
180 |
| - } |
181 |
| -} |
182 |
| - |
183 |
| -impl From<Vec<i32>> for VertexAttributeValues { |
184 |
| - fn from(vec: Vec<i32>) -> Self { |
185 |
| - VertexAttributeValues::Int(vec) |
186 |
| - } |
187 |
| -} |
188 |
| - |
189 |
| -impl From<Vec<u32>> for VertexAttributeValues { |
190 |
| - fn from(vec: Vec<u32>) -> Self { |
191 |
| - VertexAttributeValues::Uint(vec) |
192 |
| - } |
193 |
| -} |
194 |
| - |
195 |
| -impl From<Vec<[f32; 2]>> for VertexAttributeValues { |
196 |
| - fn from(vec: Vec<[f32; 2]>) -> Self { |
197 |
| - VertexAttributeValues::Float2(vec) |
198 |
| - } |
199 |
| -} |
200 |
| - |
201 |
| -impl From<Vec<[i32; 2]>> for VertexAttributeValues { |
202 |
| - fn from(vec: Vec<[i32; 2]>) -> Self { |
203 |
| - VertexAttributeValues::Int2(vec) |
204 |
| - } |
205 |
| -} |
206 |
| - |
207 |
| -impl From<Vec<[u32; 2]>> for VertexAttributeValues { |
208 |
| - fn from(vec: Vec<[u32; 2]>) -> Self { |
209 |
| - VertexAttributeValues::Uint2(vec) |
210 |
| - } |
211 |
| -} |
212 |
| - |
213 |
| -impl From<Vec<[f32; 3]>> for VertexAttributeValues { |
214 |
| - fn from(vec: Vec<[f32; 3]>) -> Self { |
215 |
| - VertexAttributeValues::Float3(vec) |
216 |
| - } |
217 |
| -} |
218 |
| - |
219 |
| -impl From<Vec<[i32; 3]>> for VertexAttributeValues { |
220 |
| - fn from(vec: Vec<[i32; 3]>) -> Self { |
221 |
| - VertexAttributeValues::Int3(vec) |
222 |
| - } |
223 |
| -} |
224 |
| - |
225 |
| -impl From<Vec<[u32; 3]>> for VertexAttributeValues { |
226 |
| - fn from(vec: Vec<[u32; 3]>) -> Self { |
227 |
| - VertexAttributeValues::Uint3(vec) |
228 |
| - } |
229 |
| -} |
230 |
| - |
231 |
| -impl From<Vec<[f32; 4]>> for VertexAttributeValues { |
232 |
| - fn from(vec: Vec<[f32; 4]>) -> Self { |
233 |
| - VertexAttributeValues::Float4(vec) |
234 |
| - } |
235 |
| -} |
236 |
| - |
237 |
| -impl From<Vec<[i32; 4]>> for VertexAttributeValues { |
238 |
| - fn from(vec: Vec<[i32; 4]>) -> Self { |
239 |
| - VertexAttributeValues::Int4(vec) |
240 |
| - } |
241 |
| -} |
242 |
| - |
243 |
| -impl From<Vec<[u32; 4]>> for VertexAttributeValues { |
244 |
| - fn from(vec: Vec<[u32; 4]>) -> Self { |
245 |
| - VertexAttributeValues::Uint4(vec) |
246 |
| - } |
247 |
| -} |
248 |
| - |
249 |
| -impl From<Vec<[u8; 4]>> for VertexAttributeValues { |
250 |
| - fn from(vec: Vec<[u8; 4]>) -> Self { |
251 |
| - VertexAttributeValues::Uchar4Norm(vec) |
252 |
| - } |
253 |
| -} |
254 |
| - |
255 | 179 | /// An array of indices into the VertexAttributeValues for a mesh.
|
256 | 180 | ///
|
257 | 181 | /// It describes the order in which the vertex attributes should be joined into faces.
|
|
0 commit comments