Used SceneAppFramework instead of CameraAppFramework in RayPicking.cpp
This commit is contained in:
parent
c99934fdf9
commit
77b0266cdc
@ -13,9 +13,6 @@
|
|||||||
using namespace hgl;
|
using namespace hgl;
|
||||||
using namespace hgl::graph;
|
using namespace hgl::graph;
|
||||||
|
|
||||||
constexpr uint32_t SCREEN_WIDTH=1280;
|
|
||||||
constexpr uint32_t SCREEN_HEIGHT=720;
|
|
||||||
|
|
||||||
static float position_data[2][3]=
|
static float position_data[2][3]=
|
||||||
{
|
{
|
||||||
{100,100,100},
|
{100,100,100},
|
||||||
@ -138,17 +135,10 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
~TestApp()
|
bool Init(uint w,uint h)
|
||||||
{
|
{
|
||||||
SAFE_CLEAR(render_list);
|
if(!SceneAppFramework::Init(w,h))
|
||||||
}
|
|
||||||
|
|
||||||
bool Init()
|
|
||||||
{
|
|
||||||
if(!CameraAppFramework::Init(SCREEN_WIDTH,SCREEN_HEIGHT))
|
|
||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
render_list=new RenderList(device);
|
|
||||||
|
|
||||||
if(!InitMaterialAndPipeline())
|
if(!InitMaterialAndPipeline())
|
||||||
return(false);
|
return(false);
|
||||||
@ -173,25 +163,11 @@ public:
|
|||||||
|
|
||||||
vbo_pos->Write(&pos,3*sizeof(float)); //更新VBO上这个点的位置
|
vbo_pos->Write(&pos,3*sizeof(float)); //更新VBO上这个点的位置
|
||||||
|
|
||||||
VulkanApplicationFramework::BuildCommandBuffer(index,render_list);
|
SceneAppFramework::BuildCommandBuffer(index);
|
||||||
}
|
|
||||||
|
|
||||||
void Resize(int w,int h) override
|
|
||||||
{
|
|
||||||
CameraAppFramework::Resize(w,h);
|
|
||||||
|
|
||||||
VulkanApplicationFramework::BuildCommandBuffer(render_list);
|
|
||||||
}
|
}
|
||||||
};//class TestApp:public CameraAppFramework
|
};//class TestApp:public CameraAppFramework
|
||||||
|
|
||||||
int main(int,char **)
|
int main(int,char **)
|
||||||
{
|
{
|
||||||
TestApp app;
|
return RunApp<TestApp>(1280,720);
|
||||||
|
|
||||||
if(!app.Init())
|
|
||||||
return(-1);
|
|
||||||
|
|
||||||
while(app.Run());
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user