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