From 684be42ddd9843d96990892619a12f1c097e06b7 Mon Sep 17 00:00:00 2001 From: Christopher Biscardi Date: Fri, 7 Jun 2024 00:32:33 -0700 Subject: [PATCH] GpuMesh::primitive_topology -> key_bits/BaseMeshPipeline [12791](https://github.com/bevyengine/bevy/pull/12791) the `primitive_topology` field on `GpuMesh` was removed in favor of `key_bits` which can be constructed using `BaseMeshPipeline::from_primitive_topology` --- src/render/chunk.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/render/chunk.rs b/src/render/chunk.rs index e8f86d1f..2ec9119c 100644 --- a/src/render/chunk.rs +++ b/src/render/chunk.rs @@ -1,9 +1,9 @@ use std::hash::{Hash, Hasher}; -use bevy::math::Mat4; use bevy::prelude::{InheritedVisibility, Resource, Transform}; -use bevy::render::primitives::Aabb; use bevy::render::render_asset::RenderAssetUsages; +use bevy::render::{mesh::BaseMeshPipelineKey, primitives::Aabb}; +use bevy::{math::Mat4, render::mesh::PrimitiveTopology}; use bevy::{ math::{UVec2, UVec3, UVec4, Vec2, Vec3Swizzles, Vec4, Vec4Swizzles}, prelude::{Component, Entity, GlobalTransform, Mesh, Vec3}, @@ -451,7 +451,9 @@ impl RenderChunk2d { buffer_info, morph_targets: None, layout: mesh_vertex_buffer_layout, - primitive_topology: bevy::render::render_resource::PrimitiveTopology::TriangleList, + key_bits: BaseMeshPipelineKey::from_primitive_topology( + PrimitiveTopology::TriangleList, + ), }); self.dirty_mesh = false; }