材质保存来自MaterialCreateInfo传递而来的PrimitiveType信息,并在创建Pipeline时传递.

减少在使用中的第二次手写传递,避免失误。
This commit is contained in:
2025-06-12 00:00:14 +08:00
parent 5935c3140f
commit 3fd6f98ef7
14 changed files with 46 additions and 34 deletions

View File

@@ -68,7 +68,7 @@ private:
mi_plane_grid=db->CreateMaterialInstance(mtl_plane_grid,&vil_config,&white_color);
if(!mi_plane_grid)return(false);
pipeline_plane_grid=CreatePipeline(mi_plane_grid,InlinePipeline::Solid3D,PrimitiveType::Lines);
pipeline_plane_grid=CreatePipeline(mi_plane_grid,InlinePipeline::Solid3D);
if(!pipeline_plane_grid)return(false);
}
@@ -81,7 +81,7 @@ private:
mi_line=db->CreateMaterialInstance(mtl_line,&vil_config,&yellow_color);
if(!mi_line)return(false);
pipeline_line=CreatePipeline(mi_line,InlinePipeline::Solid3D,PrimitiveType::Lines);
pipeline_line=CreatePipeline(mi_line,InlinePipeline::Solid3D);
if(!pipeline_line)
return(false);