完成窗口事件回调机制,并实现窗口缩放后VULKAN各种属性重建

This commit is contained in:
2019-06-13 23:12:11 +08:00
parent 1f389efda1
commit aa43932fc7
13 changed files with 144 additions and 39 deletions

View File

@@ -166,6 +166,11 @@ public:
return(true);
}
void Resize(int,int)override
{
BuildCommandBuffer(&render_list);
}
};//class TestApp:public VulkanApplicationFramework
int main(int,char **)

View File

@@ -168,6 +168,11 @@ public:
return(true);
}
void Resize(int,int)override
{
BuildCommandBuffer(&render_list);
}
};//class TestApp:public VulkanApplicationFramework
int main(int,char **)

View File

@@ -267,6 +267,11 @@ public:
return(true);
}
void Resize(int,int)override
{
BuildCommandBuffer(&render_list);
}
};//class TestApp:public VulkanApplicationFramework
#ifdef _WIN32

View File

@@ -187,6 +187,11 @@ public:
BuildCommandBuffer(&render_list);
}
void Resize(int,int)override
{
BuildCommandBuffer(&render_list);
}
};//class TestApp:public VulkanApplicationFramework
int main(int,char **)

View File

@@ -86,9 +86,19 @@ public:
InitCommandBuffer();
SetEventCall(win->OnResize,this,VulkanApplicationFramework,OnResize);
return(true);
}
virtual void Resize(int,int)=0;
void OnResize(int w,int h)
{
InitCommandBuffer();
Resize(w,h);
}
void InitCommandBuffer()
{
if(cmd_buf)

View File

@@ -140,6 +140,11 @@ public:
return(true);
}
void Resize(int,int)override
{
BuildCommandBuffer(pipeline,descriptor_sets,render_obj);
}
};//class TestApp:public VulkanApplicationFramework
int main(int,char **)

View File

@@ -154,6 +154,11 @@ public:
return(true);
}
void Resize(int,int)override
{
BuildCommandBuffer(pipeline,descriptor_sets,render_obj);
}
};//class TestApp:public VulkanApplicationFramework
int main(int,char **)

View File

@@ -177,6 +177,11 @@ public:
return(true);
}
void Resize(int,int)override
{
BuildCommandBuffer(pipeline,descriptor_sets,render_obj);
}
};//class TestApp:public VulkanApplicationFramework
int main(int,char **)