Prepare for follow-on change

This commit is contained in:
Hanno Braun 2024-11-25 22:57:36 +01:00
parent 225e66a92e
commit 090262c7db
3 changed files with 4 additions and 7 deletions

View File

@ -15,7 +15,7 @@ pub struct Geometry<V> {
}
impl Geometry<vertices::Vertex> {
pub fn vertices(device: &wgpu::Device, operation: &impl Operation) -> Self {
pub fn vertices(device: &wgpu::Device, operation: &dyn Operation) -> Self {
let mut mesh_vertices = Vec::new();
operation.vertices(&mut mesh_vertices);
@ -51,10 +51,7 @@ impl Geometry<vertices::Vertex> {
}
impl Geometry<triangles::Vertex> {
pub fn triangles(
device: &wgpu::Device,
operation: &impl Operation,
) -> Self {
pub fn triangles(device: &wgpu::Device, operation: &dyn Operation) -> Self {
let mut mesh_triangles = Vec::new();
operation.triangles(&mut mesh_triangles);

View File

@ -89,7 +89,7 @@ impl Renderer {
pub fn render(
&mut self,
selected_operation: &impl Operation,
selected_operation: &dyn Operation,
all_operations: &OpsLog,
) -> anyhow::Result<()> {
let vertices = Geometry::vertices(&self.device, selected_operation);

View File

@ -65,7 +65,7 @@ impl TextRenderer {
device: &wgpu::Device,
queue: &wgpu::Queue,
surface_config: &wgpu::SurfaceConfiguration,
_selected_operation: &impl Operation,
_selected_operation: &dyn Operation,
_all_operations: &OpsLog,
render_pass: &mut wgpu::RenderPass,
) -> anyhow::Result<()> {