added PipelineCacheCreateInfo struct.
This commit is contained in:
parent
f8646ca880
commit
8fc83ba9b3
@ -1 +1 @@
|
||||
Subproject commit fba5b2deea8784703ccdf7f6c18056178daefc3c
|
||||
Subproject commit 966025309dba8921bd0ba1c198fbae38620b0aa3
|
@ -262,7 +262,7 @@ private:
|
||||
}
|
||||
|
||||
Sampler *CreateSampler(Texture *tex)
|
||||
{
|
||||
{
|
||||
VkSamplerCreateInfo sci=
|
||||
{
|
||||
VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO,
|
||||
|
@ -57,7 +57,7 @@ private:
|
||||
if(!primitive)return(false);
|
||||
|
||||
if(!primitive->Set(VAN::Position, db->CreateVBO(VF_V2F,VERTEX_COUNT,position_data )))return(false);
|
||||
if(!primitive->Set(VAN::BaseColor, db->CreateVBO(VF_V4F,VERTEX_COUNT,color_data )))return(false);
|
||||
if(!primitive->Set(VAN::Color, db->CreateVBO(VF_V4F,VERTEX_COUNT,color_data )))return(false);
|
||||
|
||||
render_obj=db->CreateRenderable(primitive,material_instance,pipeline);
|
||||
return(true);
|
||||
|
@ -107,7 +107,7 @@ private:
|
||||
if(!ro_line)return(false);
|
||||
|
||||
if(!ro_line->Set(VAN::Position, vbo_pos=db->CreateVBO(VF_V3F,2,position_data )))return(false);
|
||||
if(!ro_line->Set(VAN::BaseColor, db->CreateVBO(VF_V4F,2,color_data )))return(false);
|
||||
if(!ro_line->Set(VAN::Color, db->CreateVBO(VF_V4F,2,color_data )))return(false);
|
||||
}
|
||||
|
||||
return(true);
|
||||
|
@ -57,10 +57,10 @@ private:
|
||||
if(!primitive)return(false);
|
||||
|
||||
if(!primitive->Set(VAN::Position, db->CreateVBO(VF_V2F,VERTEX_COUNT,position_data )))return(false);
|
||||
if(!primitive->Set(VAN::BaseColor, db->CreateVBO(VF_V4F,VERTEX_COUNT,color_data )))return(false);
|
||||
if(!primitive->Set(VAN::Color, db->CreateVBO(VF_V4F,VERTEX_COUNT,color_data )))return(false);
|
||||
|
||||
render_obj=db->CreateRenderable(primitive,material_instance,pipeline);
|
||||
return(true);
|
||||
return(render_obj);
|
||||
}
|
||||
|
||||
public:
|
||||
|
@ -60,7 +60,7 @@ private:
|
||||
if(!primitive)return(false);
|
||||
|
||||
if(!primitive->Set(VAN::Position, db->CreateVBO(VF_V2F,VERTEX_COUNT,position_data )))return(false);
|
||||
if(!primitive->Set(VAN::BaseColor, db->CreateVBO(VF_V4F,VERTEX_COUNT,color_data )))return(false);
|
||||
if(!primitive->Set(VAN::Color, db->CreateVBO(VF_V4F,VERTEX_COUNT,color_data )))return(false);
|
||||
|
||||
render_obj=db->CreateRenderable(primitive,material_instance,pipeline);
|
||||
return(true);
|
||||
|
@ -61,7 +61,7 @@ private:
|
||||
if(!primitive)return(false);
|
||||
|
||||
if(!primitive->Set(VAN::Position, db->CreateVBO(VF_V2F,VERTEX_COUNT,position_data )))return(false);
|
||||
if(!primitive->Set(VAN::BaseColor, db->CreateVBO(VF_V4F,VERTEX_COUNT,color_data )))return(false);
|
||||
if(!primitive->Set(VAN::Color, db->CreateVBO(VF_V4F,VERTEX_COUNT,color_data )))return(false);
|
||||
|
||||
render_obj=db->CreateRenderable(primitive,material_instance,pipeline);
|
||||
|
||||
|
@ -14,7 +14,7 @@ namespace hgl
|
||||
#define VAN_DEFINE(name) constexpr char name[]=#name;
|
||||
VAN_DEFINE(Position)
|
||||
VAN_DEFINE(Normal)
|
||||
VAN_DEFINE(BaseColor)
|
||||
VAN_DEFINE(Color)
|
||||
VAN_DEFINE(Tangent)
|
||||
VAN_DEFINE(Bitangent)
|
||||
VAN_DEFINE(TexCoord)
|
||||
|
@ -132,7 +132,7 @@ namespace hgl
|
||||
}
|
||||
|
||||
AutoDelete<VB2f> vertex=rc.CreateVADA<VB2f>(VAN::Position);
|
||||
AutoDelete<VB4f> color=rc.CreateVADA<VB4f>(VAN::BaseColor);
|
||||
AutoDelete<VB4f> color=rc.CreateVADA<VB4f>(VAN::Color);
|
||||
|
||||
if(!vertex)
|
||||
return(nullptr);
|
||||
@ -186,7 +186,7 @@ namespace hgl
|
||||
to(pgci->coord[0],pgci->coord[3],pos));
|
||||
}
|
||||
|
||||
AutoDelete<VB4f> color=rc.CreateVADA<VB4f>(VAN::BaseColor);
|
||||
AutoDelete<VB4f> color=rc.CreateVADA<VB4f>(VAN::Color);
|
||||
if(color)
|
||||
{
|
||||
for(uint row=0;row<=pgci->step.x;row++)
|
||||
@ -323,7 +323,7 @@ namespace hgl
|
||||
{
|
||||
ENUM_CLASS_RANGE_ERROR_RETURN_NULLPTR(cci->color_type);
|
||||
|
||||
AutoDelete<VB4f> color=rc.CreateVADA<VB4f>(VAN::BaseColor);
|
||||
AutoDelete<VB4f> color=rc.CreateVADA<VB4f>(VAN::Color);
|
||||
|
||||
if(color)
|
||||
{
|
||||
@ -1151,7 +1151,7 @@ namespace hgl
|
||||
return(nullptr);
|
||||
|
||||
AutoDelete<VB3f> vertex=rc.CreateVADA<VB3f>(VAN::Position);
|
||||
AutoDelete<VB4f> color=rc.CreateVADA<VB4f>(VAN::BaseColor);
|
||||
AutoDelete<VB4f> color=rc.CreateVADA<VB4f>(VAN::Color);
|
||||
|
||||
if(!vertex||!color)
|
||||
return(nullptr);
|
||||
@ -1205,7 +1205,7 @@ namespace hgl
|
||||
{
|
||||
ENUM_CLASS_RANGE_ERROR_RETURN_NULLPTR(cci->color_type);
|
||||
|
||||
AutoDelete<VB4f> color=rc.CreateVADA<VB4f>(VAN::BaseColor);
|
||||
AutoDelete<VB4f> color=rc.CreateVADA<VB4f>(VAN::Color);
|
||||
|
||||
if(color)
|
||||
{
|
||||
|
@ -55,11 +55,8 @@ namespace
|
||||
|
||||
VkPipelineCache CreatePipelineCache(VkDevice device,const VkPhysicalDeviceProperties &pdp)
|
||||
{
|
||||
VkPipelineCacheCreateInfo pipelineCache;
|
||||
|
||||
pipelineCache.sType = VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO;
|
||||
pipelineCache.pNext = nullptr;
|
||||
pipelineCache.flags = 0;
|
||||
PipelineCacheCreateInfo pipelineCache;
|
||||
|
||||
pipelineCache.initialDataSize = 0;
|
||||
pipelineCache.pInitialData = nullptr;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user