finished the branch,,,local to world in VertexInputStreaming.

This commit is contained in:
2023-05-06 22:19:50 +08:00
parent abfc84feff
commit 958183bb29
12 changed files with 109 additions and 53 deletions

View File

@@ -45,9 +45,16 @@ private:
bool InitMaterial()
{
AutoDelete<MaterialCreateInfo> mci=mtl::CreateVertexColor2D(mtl::CoordinateSystem2D::ZeroToOne);
{
mtl::Material2DConfig cfg;
material_instance=db->CreateMaterialInstance(mci);
cfg.coordinate_system=mtl::CoordinateSystem2D::ZeroToOne;
cfg.local_to_world=true;
AutoDelete<MaterialCreateInfo> mci=mtl::CreateVertexColor2D(&cfg);
material_instance=db->CreateMaterialInstance(mci);
}
if(!material_instance)
return(false);
@@ -70,7 +77,8 @@ private:
if(!render_obj)
return(false);
render_root.CreateSubNode(render_obj);
render_root.CreateSubNode(translate(-0.25,0),render_obj);
render_root.CreateSubNode(translate( 0.25,0),render_obj);
render_root.RefreshMatrix();