updated example
This commit is contained in:
parent
d902774d46
commit
e2af7fb15a
@ -1 +1 @@
|
|||||||
Subproject commit bb671a9674155a184671caa047844dd9e82f2ad5
|
Subproject commit 72b59fc22ece0a2e76b2319060dd99490297a238
|
@ -1 +1 @@
|
|||||||
Subproject commit 45102e04208043bf1ae84f9c58d4a56278527844
|
Subproject commit 143cddc02c3245ba46adce414225fc2851caf667
|
@ -30,7 +30,7 @@ private:
|
|||||||
MaterialInstance * axis_mi =nullptr;
|
MaterialInstance * axis_mi =nullptr;
|
||||||
|
|
||||||
Pipeline * axis_pipeline =nullptr;
|
Pipeline * axis_pipeline =nullptr;
|
||||||
Pipeline * pipeline_solid =nullptr;
|
Pipeline * sky_pipeline =nullptr;
|
||||||
|
|
||||||
GPUBuffer * ubo_light =nullptr;
|
GPUBuffer * ubo_light =nullptr;
|
||||||
GPUBuffer * ubo_phong =nullptr;
|
GPUBuffer * ubo_phong =nullptr;
|
||||||
@ -57,7 +57,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
texture =db->LoadTextureCube(OS_TEXT("res/cubemap/Test.TexCube"),true);
|
texture =db->LoadTextureCube(OS_TEXT("res/cubemap/Storforsen4.TexCube"),true);
|
||||||
|
|
||||||
if(!texture)
|
if(!texture)
|
||||||
return(false);
|
return(false);
|
||||||
@ -107,8 +107,8 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pipeline_solid=CreatePipeline(material_instance,InlinePipeline::Solid3D,Prim::Triangles);
|
sky_pipeline=CreatePipeline(material_instance,InlinePipeline::Sky,Prim::Triangles);
|
||||||
if(!pipeline_solid)return(false);
|
if(!sky_pipeline)return(false);
|
||||||
|
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
@ -145,6 +145,17 @@ private:
|
|||||||
mp_global->Update();
|
mp_global->Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
MaterialParameters *mp_global=material_instance->GetMP(DescriptorSetsType::Global);
|
||||||
|
|
||||||
|
if(!mp_global)
|
||||||
|
return(false);
|
||||||
|
|
||||||
|
if(!mp_global->BindUBO("g_camera",GetCameraInfoBuffer()))return(false);
|
||||||
|
|
||||||
|
mp_global->Update();
|
||||||
|
}
|
||||||
|
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -166,7 +177,7 @@ private:
|
|||||||
{
|
{
|
||||||
render_root.CreateSubNode(db->CreateRenderableInstance(ro_axis,axis_mi,axis_pipeline));
|
render_root.CreateSubNode(db->CreateRenderableInstance(ro_axis,axis_mi,axis_pipeline));
|
||||||
|
|
||||||
Add(ro_cube,pipeline_solid);
|
Add(ro_cube,sky_pipeline);
|
||||||
|
|
||||||
render_root.RefreshMatrix();
|
render_root.RefreshMatrix();
|
||||||
render_list->Expend(GetCameraInfo(),&render_root);
|
render_list->Expend(GetCameraInfo(),&render_root);
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
using namespace hgl;
|
using namespace hgl;
|
||||||
using namespace hgl::graph;
|
using namespace hgl::graph;
|
||||||
|
|
||||||
constexpr uint32_t SCREEN_WIDTH=128;
|
constexpr uint32_t SCREEN_WIDTH=256;
|
||||||
constexpr uint32_t SCREEN_HEIGHT=128;
|
constexpr uint32_t SCREEN_HEIGHT=256;
|
||||||
|
|
||||||
constexpr uint32_t VERTEX_COUNT=4;
|
constexpr uint32_t VERTEX_COUNT=4;
|
||||||
|
|
||||||
|
2
res
2
res
@ -1 +1 @@
|
|||||||
Subproject commit 23303f0aff3ac24351f4f872fe657ea8c8172c1e
|
Subproject commit e65aa9ac86ff0bce4e1bf9bc96221d1ff3123c5d
|
Loading…
x
Reference in New Issue
Block a user