renamed to VertexInputLayout instead of VertexAttributeBinding
This commit is contained in:
@@ -54,15 +54,15 @@ private:
|
||||
bool InitMaterial()
|
||||
{
|
||||
//2D渲染Position坐标全部是使用整数,这里强制要求Position输入流使用RGBA16I格式
|
||||
VABConfigInfo vab_config;
|
||||
VILConfig vil_config;
|
||||
VAConfig va_cfg;
|
||||
|
||||
va_cfg.format=VF_V4I16;
|
||||
va_cfg.instance=false;
|
||||
|
||||
vab_config.Add("Position",va_cfg);
|
||||
vil_config.Add("Position",va_cfg);
|
||||
|
||||
material_instance=db->CreateMaterialInstance(OS_TEXT("res/material/RoundedBox"),&vab_config);
|
||||
material_instance=db->CreateMaterialInstance(OS_TEXT("res/material/RoundedBox"),&vil_config);
|
||||
if(!material_instance)
|
||||
return(false);
|
||||
|
||||
|
@@ -81,7 +81,7 @@ private:
|
||||
|
||||
bool InitScene()
|
||||
{
|
||||
ro_sphere=inline_geometry::CreateSphere(db,material_instance->GetVAB(),128);
|
||||
ro_sphere=inline_geometry::CreateSphere(db,material_instance->GetVIL(),128);
|
||||
|
||||
render_root.CreateSubNode(scale(100),db->CreateRenderable(ro_sphere,material_instance,pipeline_solid));
|
||||
|
||||
|
@@ -128,17 +128,17 @@ private:
|
||||
|
||||
aci.size=GetCameraInfo().zfar;
|
||||
|
||||
ro_axis=CreateAxis(db,axis_mi->GetVAB(),&aci);
|
||||
ro_axis=CreateAxis(db,axis_mi->GetVIL(),&aci);
|
||||
}
|
||||
|
||||
{
|
||||
struct CubeCreateInfo cci;
|
||||
|
||||
ro_cube=CreateCube(db,sky_mi->GetVAB(),&cci);
|
||||
ro_cube=CreateCube(db,sky_mi->GetVIL(),&cci);
|
||||
}
|
||||
|
||||
{
|
||||
ro_sphere=CreateSphere(db,envmap_mi->GetVAB(),64);
|
||||
ro_sphere=CreateSphere(db,envmap_mi->GetVIL(),64);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -339,22 +339,22 @@ private:
|
||||
return(true);
|
||||
}
|
||||
|
||||
void CreateRenderObject(const VAB *vab)
|
||||
void CreateRenderObject(const VIL *vil)
|
||||
{
|
||||
using namespace inline_geometry;
|
||||
|
||||
{
|
||||
struct PlaneCreateInfo pci;
|
||||
ro_plane=CreatePlane(db,vab,&pci);
|
||||
ro_plane=CreatePlane(db,vil,&pci);
|
||||
}
|
||||
|
||||
{
|
||||
struct CubeCreateInfo cci;
|
||||
ro_cube=CreateCube(db,vab,&cci);
|
||||
ro_cube=CreateCube(db,vil,&cci);
|
||||
}
|
||||
|
||||
{
|
||||
ro_sphere=CreateSphere(db,vab,64);
|
||||
ro_sphere=CreateSphere(db,vil,64);
|
||||
}
|
||||
|
||||
{
|
||||
@@ -369,7 +369,7 @@ private:
|
||||
tci.uv_scale.x=4;
|
||||
tci.uv_scale.y=1;
|
||||
|
||||
ro_torus=CreateTorus(db,vab,&tci);
|
||||
ro_torus=CreateTorus(db,vil,&tci);
|
||||
}
|
||||
|
||||
{
|
||||
@@ -379,7 +379,7 @@ private:
|
||||
cci.radius=10;
|
||||
cci.numberSlices=32;
|
||||
|
||||
ro_cylinder=CreateCylinder(db,vab,&cci);
|
||||
ro_cylinder=CreateCylinder(db,vil,&cci);
|
||||
}
|
||||
|
||||
{
|
||||
@@ -390,13 +390,13 @@ private:
|
||||
cci.numberSlices=128;
|
||||
cci.numberStacks=32;
|
||||
|
||||
ro_cone=CreateCone(db,vab,&cci);
|
||||
ro_cone=CreateCone(db,vil,&cci);
|
||||
}
|
||||
}
|
||||
|
||||
bool InitCompositionRenderable()
|
||||
{
|
||||
ro_gbc_plane=inline_geometry::CreateGBufferCompositionRectangle(db,sp_composition.material_instance->GetVAB());
|
||||
ro_gbc_plane=inline_geometry::CreateGBufferCompositionRectangle(db,sp_composition.material_instance->GetVIL());
|
||||
if(!ro_gbc_plane)return(false);
|
||||
|
||||
ro_gbc_plane_ri=db->CreateRenderable(ro_gbc_plane,sp_composition.material_instance,sp_composition.pipeline_fan);
|
||||
@@ -407,7 +407,7 @@ private:
|
||||
|
||||
bool InitScene(SubpassParam *sp)
|
||||
{
|
||||
CreateRenderObject(sp->material_instance->GetVAB());
|
||||
CreateRenderObject(sp->material_instance->GetVIL());
|
||||
render_root.CreateSubNode( scale(100,100,1), db->CreateRenderable(ro_plane ,sp->material_instance,sp->pipeline_fan ));
|
||||
render_root.CreateSubNode( db->CreateRenderable(ro_torus ,sp->material_instance,sp->pipeline_triangles));
|
||||
render_root.CreateSubNode( scale(20,20,20), db->CreateRenderable(ro_sphere ,sp->material_instance,sp->pipeline_triangles));
|
||||
|
@@ -64,7 +64,7 @@ private:
|
||||
|
||||
void CreateRenderObject()
|
||||
{
|
||||
ro_sphere=inline_geometry::CreateSphere(db,envmap_mi->GetVAB(),128);
|
||||
ro_sphere=inline_geometry::CreateSphere(db,envmap_mi->GetVIL(),128);
|
||||
}
|
||||
|
||||
bool InitUBO()
|
||||
|
@@ -76,18 +76,18 @@ private:
|
||||
pgci.color.Set(0.5,0,0,1);
|
||||
pgci.side_color.Set(1,0,0,1);
|
||||
|
||||
const VAB *vab=material_instance->GetVAB();
|
||||
const VIL *vil=material_instance->GetVIL();
|
||||
|
||||
ro_plane_grid[0]=CreatePlaneGrid(db,vab,&pgci);
|
||||
ro_plane_grid[0]=CreatePlaneGrid(db,vil,&pgci);
|
||||
|
||||
pgci.color.Set(0,0.5,0,1);
|
||||
pgci.side_color.Set(0,1,0,1);
|
||||
|
||||
ro_plane_grid[1]=CreatePlaneGrid(db,vab,&pgci);
|
||||
ro_plane_grid[1]=CreatePlaneGrid(db,vil,&pgci);
|
||||
|
||||
pgci.color.Set(0,0,0.5,1);
|
||||
pgci.side_color.Set(0,0,1,1);
|
||||
ro_plane_grid[2]=CreatePlaneGrid(db,vab,&pgci);
|
||||
ro_plane_grid[2]=CreatePlaneGrid(db,vil,&pgci);
|
||||
}
|
||||
|
||||
bool InitScene()
|
||||
|
@@ -154,10 +154,10 @@ private:
|
||||
|
||||
aci.size=200;
|
||||
|
||||
ro_axis=CreateAxis(db,axis_mi->GetVAB(),&aci);
|
||||
ro_axis=CreateAxis(db,axis_mi->GetVIL(),&aci);
|
||||
}
|
||||
|
||||
const VAB *vab=material_instance->GetVAB();
|
||||
const VIL *vil=material_instance->GetVIL();
|
||||
|
||||
{
|
||||
struct CubeCreateInfo cci;
|
||||
@@ -166,11 +166,11 @@ private:
|
||||
cci.tex_coord=true;
|
||||
cci.color_type=CubeCreateInfo::ColorType::SameColor;
|
||||
cci.color[0]=Vector4f(1,1,1,1);
|
||||
ro_cube=CreateCube(db,vab,&cci);
|
||||
ro_cube=CreateCube(db,vil,&cci);
|
||||
}
|
||||
|
||||
{
|
||||
ro_sphere=CreateSphere(db,vab,64);
|
||||
ro_sphere=CreateSphere(db,vil,64);
|
||||
}
|
||||
|
||||
{
|
||||
@@ -185,7 +185,7 @@ private:
|
||||
tci.uv_scale.x=4;
|
||||
tci.uv_scale.y=1;
|
||||
|
||||
ro_torus=CreateTorus(db,vab,&tci);
|
||||
ro_torus=CreateTorus(db,vil,&tci);
|
||||
}
|
||||
|
||||
{
|
||||
@@ -195,7 +195,7 @@ private:
|
||||
cci.radius=10;
|
||||
cci.numberSlices=32;
|
||||
|
||||
ro_cylinder=CreateCylinder(db,vab,&cci);
|
||||
ro_cylinder=CreateCylinder(db,vil,&cci);
|
||||
}
|
||||
|
||||
{
|
||||
@@ -206,7 +206,7 @@ private:
|
||||
cci.numberSlices=128;
|
||||
cci.numberStacks=32;
|
||||
|
||||
ro_cone=CreateCone(db,vab,&cci);
|
||||
ro_cone=CreateCone(db,vil,&cci);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -107,7 +107,7 @@ public:
|
||||
cci.center_color=Vector4f(1,1,1,1);
|
||||
cci.border_color=Vector4f(1,1,1,0);
|
||||
|
||||
Primitive *primitive=CreateCircle(db,os.material_instance->GetVAB(),&cci);
|
||||
Primitive *primitive=CreateCircle(db,os.material_instance->GetVIL(),&cci);
|
||||
if(!primitive)return(false);
|
||||
|
||||
os.renderable=db->CreateRenderable(primitive,os.material_instance,os.pipeline);
|
||||
@@ -145,7 +145,7 @@ public:
|
||||
|
||||
cci.tex_coord=true;
|
||||
|
||||
Primitive *primitive=CreateCube(db,cube.material_instance->GetVAB(),&cci);
|
||||
Primitive *primitive=CreateCube(db,cube.material_instance->GetVIL(),&cci);
|
||||
if(!primitive)return(false);
|
||||
|
||||
cube.renderable=db->CreateRenderable(primitive,cube.material_instance,cube.pipeline);
|
||||
|
@@ -97,9 +97,9 @@ private:
|
||||
pgci.color.Set(0.25,0,0,1);
|
||||
pgci.side_color.Set(1,0,0,1);
|
||||
|
||||
const VAB *vab=material_instance->GetVAB();
|
||||
const VIL *vil=material_instance->GetVIL();
|
||||
|
||||
ro_plane_grid=CreatePlaneGrid(db,vab,&pgci);
|
||||
ro_plane_grid=CreatePlaneGrid(db,vil,&pgci);
|
||||
}
|
||||
|
||||
{
|
||||
|
@@ -67,7 +67,7 @@ private:
|
||||
|
||||
void CreateRenderObject()
|
||||
{
|
||||
primitive=inline_geometry::CreateSphere(db,material_instance->GetVAB(),40);
|
||||
primitive=inline_geometry::CreateSphere(db,material_instance->GetVIL(),40);
|
||||
}
|
||||
|
||||
bool InitUBO()
|
||||
|
@@ -88,9 +88,9 @@ private:
|
||||
|
||||
void CreateRenderObject()
|
||||
{
|
||||
const VAB *vab=material_instance->GetVAB();
|
||||
const VIL *vil=material_instance->GetVIL();
|
||||
|
||||
ro_skyphere=inline_geometry::CreateDome(db,vab,64);
|
||||
ro_skyphere=inline_geometry::CreateDome(db,vil,64);
|
||||
}
|
||||
|
||||
bool InitScene()
|
||||
|
@@ -28,7 +28,7 @@ constexpr uint32_t SCREEN_HEIGHT=720;
|
||||
/**
|
||||
* <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*/
|
||||
Primitive *CreateRenderableTerrain(RenderResource *db,const VAB *vab,const TerrainCreateInfo *tci)
|
||||
Primitive *CreateRenderableTerrain(RenderResource *db,const VIL *vil,const TerrainCreateInfo *tci)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -95,9 +95,9 @@ private:
|
||||
pgci.color.Set(0.75,0.75,0.75);
|
||||
pgci.side_color.Set(1,0,0,1);
|
||||
|
||||
const VAB *vab=material_instance->GetVAB();
|
||||
const VIL *vil=material_instance->GetVIL();
|
||||
|
||||
renderable=CreatePlaneGrid(db,vab,&pgci);
|
||||
renderable=CreatePlaneGrid(db,vil,&pgci);
|
||||
}
|
||||
|
||||
bool InitScene()
|
||||
|
Reference in New Issue
Block a user