Merge branch 'new_RenderList' of https://github.com/hyzboy/ULRE into new_RenderList
This commit is contained in:
@@ -6,21 +6,21 @@
|
||||
#include<hgl/filesystem/FileSystem.h>
|
||||
#include<hgl/graph/VKRenderablePrimitiveCreater.h>
|
||||
#include<hgl/graph/mtl/2d/VertexColor2D.h>
|
||||
#include<hgl/graph/RenderList2D.h>
|
||||
#include<hgl/graph/RenderList.h>
|
||||
|
||||
using namespace hgl;
|
||||
using namespace hgl::graph;
|
||||
|
||||
constexpr uint32_t SCREEN_WIDTH=1280;
|
||||
constexpr uint32_t SCREEN_HEIGHT=720;
|
||||
constexpr uint32_t SCREEN_WIDTH=1024;
|
||||
constexpr uint32_t SCREEN_HEIGHT=1024;
|
||||
|
||||
constexpr uint32_t VERTEX_COUNT=3;
|
||||
|
||||
constexpr float position_data[VERTEX_COUNT][2]=
|
||||
constexpr float position_data[VERTEX_COUNT*2]=
|
||||
{
|
||||
{0.5, 0.25},
|
||||
{0.25, 0.75},
|
||||
{0.75, 0.75}
|
||||
0.0, 0.0,
|
||||
-0.1, 0.9,
|
||||
0.1, 0.9
|
||||
};
|
||||
|
||||
constexpr float color_data[VERTEX_COUNT][4]=
|
||||
@@ -34,7 +34,7 @@ class TestApp:public VulkanApplicationFramework
|
||||
private:
|
||||
|
||||
SceneNode render_root;
|
||||
RenderList2D * render_list =nullptr;
|
||||
RenderList * render_list =nullptr;
|
||||
|
||||
MaterialInstance * material_instance =nullptr;
|
||||
Renderable * render_obj =nullptr;
|
||||
@@ -48,7 +48,7 @@ private:
|
||||
{
|
||||
mtl::Material2DConfig cfg;
|
||||
|
||||
cfg.coordinate_system=mtl::CoordinateSystem2D::ZeroToOne;
|
||||
cfg.coordinate_system=mtl::CoordinateSystem2D::NDC;
|
||||
cfg.local_to_world=true;
|
||||
|
||||
AutoDelete<MaterialCreateInfo> mci=mtl::CreateVertexColor2D(&cfg);
|
||||
@@ -76,9 +76,9 @@ private:
|
||||
|
||||
if(!render_obj)
|
||||
return(false);
|
||||
|
||||
render_root.CreateSubNode(translate(-0.25,0),render_obj);
|
||||
render_root.CreateSubNode(translate( 0.25,0),render_obj);
|
||||
|
||||
for(uint i=0;i<12;i++)
|
||||
render_root.CreateSubNode(rotate(deg2rad(30*i),Vector3f(0,0,1)),render_obj);
|
||||
|
||||
render_root.RefreshMatrix();
|
||||
|
||||
@@ -99,7 +99,7 @@ public:
|
||||
if(!VulkanApplicationFramework::Init(SCREEN_WIDTH,SCREEN_HEIGHT))
|
||||
return(false);
|
||||
|
||||
render_list=new RenderList2D(device);
|
||||
render_list=new RenderList(device);
|
||||
|
||||
if(!InitMaterial())
|
||||
return(false);
|
||||
|
Reference in New Issue
Block a user