修改以支持win32模式
This commit is contained in:
@@ -70,7 +70,7 @@ private:
|
||||
if(!ubo_atomsphere)
|
||||
return(false);
|
||||
|
||||
return desc_set->BindUBO(bindpoint,*ubo_atomsphere);
|
||||
return desc_set->BindUBO(bindpoint,ubo_atomsphere);
|
||||
}
|
||||
|
||||
bool InitUBO()
|
||||
|
@@ -20,13 +20,6 @@ constexpr uint32_t GBUFFER_HEIGHT=1024;
|
||||
constexpr uint32_t SCREEN_WIDTH=128;
|
||||
constexpr uint32_t SCREEN_HEIGHT=128;
|
||||
|
||||
struct AtomsphereData
|
||||
{
|
||||
alignas(16) Vector3f position;
|
||||
float intensity;
|
||||
float scattering_direction;
|
||||
};//
|
||||
|
||||
using Texture2DPointer=vulkan::Texture2D *;
|
||||
|
||||
constexpr VkFormat position_candidate_format[]={FMT_RGBA32F,FMT_RGBA16F};
|
||||
|
@@ -105,7 +105,7 @@ private:
|
||||
if(!ubo_mvp)
|
||||
return(false);
|
||||
|
||||
if(!descriptor_sets->BindUBO(material->GetUBO("world"),*ubo_mvp))
|
||||
if(!descriptor_sets->BindUBO(material->GetUBO("world"),ubo_mvp))
|
||||
return(false);
|
||||
|
||||
descriptor_sets->Update();
|
||||
|
@@ -76,7 +76,7 @@ public:
|
||||
if(!ubo_world_matrix)
|
||||
return(false);
|
||||
|
||||
return desc_set->BindUBO(world_matrix_bindpoint,*ubo_world_matrix);
|
||||
return desc_set->BindUBO(world_matrix_bindpoint,ubo_world_matrix);
|
||||
}
|
||||
|
||||
void Resize(int w,int h)override
|
||||
|
@@ -292,7 +292,7 @@ public:
|
||||
if(!ubo_world_matrix)
|
||||
return(false);
|
||||
|
||||
return desc_set->BindUBO(world_matrix_bindpoint,*ubo_world_matrix);
|
||||
return desc_set->BindUBO(world_matrix_bindpoint,ubo_world_matrix);
|
||||
}
|
||||
|
||||
virtual void BuildCommandBuffer(uint32_t index)=0;
|
||||
|
@@ -85,7 +85,7 @@ private:
|
||||
if(!ubo_mvp)
|
||||
return(false);
|
||||
|
||||
if(!descriptor_sets->BindUBO(material->GetUBO("world"),*ubo_mvp))
|
||||
if(!descriptor_sets->BindUBO(material->GetUBO("world"),ubo_mvp))
|
||||
return(false);
|
||||
|
||||
descriptor_sets->Update();
|
||||
|
@@ -86,7 +86,7 @@ private:
|
||||
if(!ubo_mvp)
|
||||
return(false);
|
||||
|
||||
if(!descriptor_sets->BindUBO(material->GetUBO("world"),*ubo_mvp))
|
||||
if(!descriptor_sets->BindUBO(material->GetUBO("world"),ubo_mvp))
|
||||
return(false);
|
||||
|
||||
descriptor_sets->Update();
|
||||
|
@@ -118,7 +118,7 @@ private:
|
||||
sampler=device->CreateSampler(&sampler_create_info);
|
||||
|
||||
descriptor_sets->BindSampler(material->GetSampler("texture_lena"),texture,sampler);
|
||||
descriptor_sets->BindUBO(material->GetUBO("world"),*ubo_mvp);
|
||||
descriptor_sets->BindUBO(material->GetUBO("world"),ubo_mvp);
|
||||
descriptor_sets->Update();
|
||||
|
||||
return(true);
|
||||
|
Reference in New Issue
Block a user