layout codes.
This commit is contained in:
parent
c8955b6f35
commit
cca69c10b9
@ -16,7 +16,7 @@ class TestApp:public CameraAppFramework
|
|||||||
Camera cam;
|
Camera cam;
|
||||||
|
|
||||||
MaterialInstance * material_instance =nullptr;
|
MaterialInstance * material_instance =nullptr;
|
||||||
GPUBuffer * ubo_world_matrix =nullptr;
|
GPUBuffer * ubo_world_matrix =nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct:public RenderObject
|
struct:public RenderObject
|
||||||
@ -34,8 +34,8 @@ class TestApp:public CameraAppFramework
|
|||||||
Pipeline * pipeline =nullptr;
|
Pipeline * pipeline =nullptr;
|
||||||
RenderableInstance *renderable_instance =nullptr;
|
RenderableInstance *renderable_instance =nullptr;
|
||||||
|
|
||||||
SceneNode scene_root;
|
SceneNode scene_root;
|
||||||
RenderList render_list;
|
RenderList render_list;
|
||||||
}cube;
|
}cube;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -46,22 +46,22 @@ protected:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
GPUDevice * device =nullptr;
|
GPUDevice * device =nullptr;
|
||||||
SwapchainRenderTarget * sc_render_target =nullptr;
|
SwapchainRenderTarget * sc_render_target =nullptr;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
int32_t swap_chain_count =0;
|
int32_t swap_chain_count =0;
|
||||||
|
|
||||||
GPUCmdBuffer ** cmd_buf =nullptr;
|
GPUCmdBuffer ** cmd_buf =nullptr;
|
||||||
|
|
||||||
Color4f clear_color;
|
Color4f clear_color;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
RenderResource * db =nullptr;
|
RenderResource * db =nullptr;
|
||||||
|
|
||||||
bool key_status[kbRangeSize];
|
bool key_status[kbRangeSize];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -88,7 +88,7 @@ public:
|
|||||||
|
|
||||||
InitNativeWindowSystem();
|
InitNativeWindowSystem();
|
||||||
|
|
||||||
VK_NAMESPACE::InitVulkanProperties();
|
InitVulkanProperties();
|
||||||
|
|
||||||
win=CreateRenderWindow(OS_TEXT("VulkanTest"));
|
win=CreateRenderWindow(OS_TEXT("VulkanTest"));
|
||||||
if(!win)
|
if(!win)
|
||||||
@ -98,7 +98,7 @@ public:
|
|||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
{
|
{
|
||||||
VK_NAMESPACE::CreateInstanceLayerInfo cili;
|
CreateInstanceLayerInfo cili;
|
||||||
|
|
||||||
hgl_zero(cili);
|
hgl_zero(cili);
|
||||||
|
|
||||||
@ -332,14 +332,14 @@ class CameraAppFramework:public VulkanApplicationFramework
|
|||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
GPUBuffer * ubo_world_matrix =nullptr;
|
GPUBuffer * ubo_world_matrix =nullptr;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
ControlCamera camera;
|
ControlCamera camera;
|
||||||
float move_speed=1;
|
float move_speed=1;
|
||||||
|
|
||||||
Vector2f mouse_last_pos;
|
Vector2f mouse_last_pos;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ public:
|
|||||||
virtual ~GPUDevice();
|
virtual ~GPUDevice();
|
||||||
|
|
||||||
operator VkDevice () {return attr->device;}
|
operator VkDevice () {return attr->device;}
|
||||||
GPUDeviceAttribute *GetGPUDeviceAttribute () {return attr;}
|
GPUDeviceAttribute *GetDeviceAttribute () {return attr;}
|
||||||
|
|
||||||
VkSurfaceKHR GetSurface () {return attr->surface;}
|
VkSurfaceKHR GetSurface () {return attr->surface;}
|
||||||
VkDevice GetDevice ()const {return attr->device;}
|
VkDevice GetDevice ()const {return attr->device;}
|
||||||
@ -91,8 +91,8 @@ private: //Buffer相关
|
|||||||
|
|
||||||
public: //Buffer相关
|
public: //Buffer相关
|
||||||
|
|
||||||
GPUBuffer * CreateBuffer(VkBufferUsageFlags buf_usage,VkDeviceSize size,const void *data, SharingMode sharing_mode=SharingMode::Exclusive);
|
GPUBuffer * CreateBuffer(VkBufferUsageFlags buf_usage,VkDeviceSize size,const void *data, SharingMode sharing_mode=SharingMode::Exclusive);
|
||||||
GPUBuffer * CreateBuffer(VkBufferUsageFlags buf_usage,VkDeviceSize size, SharingMode sharing_mode=SharingMode::Exclusive){return CreateBuffer(buf_usage,size,nullptr,sharing_mode);}
|
GPUBuffer * CreateBuffer(VkBufferUsageFlags buf_usage,VkDeviceSize size, SharingMode sharing_mode=SharingMode::Exclusive){return CreateBuffer(buf_usage,size,nullptr,sharing_mode);}
|
||||||
|
|
||||||
VAB * CreateVAB (VkFormat format,uint32_t count,const void *data, SharingMode sharing_mode=SharingMode::Exclusive);
|
VAB * CreateVAB (VkFormat format,uint32_t count,const void *data, SharingMode sharing_mode=SharingMode::Exclusive);
|
||||||
VAB * CreateVAB (VkFormat format,uint32_t count, SharingMode sharing_mode=SharingMode::Exclusive){return CreateVAB(format,count,nullptr,sharing_mode);}
|
VAB * CreateVAB (VkFormat format,uint32_t count, SharingMode sharing_mode=SharingMode::Exclusive){return CreateVAB(format,count,nullptr,sharing_mode);}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user