updated texture_rect.cpp, but it can't run.
This commit is contained in:
parent
8512d4169c
commit
c49131e517
@ -51,7 +51,7 @@ private:
|
|||||||
|
|
||||||
Texture2D * texture =nullptr;
|
Texture2D * texture =nullptr;
|
||||||
Sampler * sampler =nullptr;
|
Sampler * sampler =nullptr;
|
||||||
MaterialParameters * material_instance =nullptr;
|
MaterialInstance * material_instance =nullptr;
|
||||||
RenderableInstance *renderable_instance =nullptr;
|
RenderableInstance *renderable_instance =nullptr;
|
||||||
GPUBuffer * ubo_camera_info =nullptr;
|
GPUBuffer * ubo_camera_info =nullptr;
|
||||||
Pipeline * pipeline =nullptr;
|
Pipeline * pipeline =nullptr;
|
||||||
@ -71,7 +71,15 @@ private:
|
|||||||
|
|
||||||
sampler=db->CreateSampler();
|
sampler=db->CreateSampler();
|
||||||
|
|
||||||
material_instance->BindSampler("tex",texture,sampler);
|
{
|
||||||
|
MaterialParameters *mp_texture=material_instance->GetMP(DescriptorSetsType::Value);
|
||||||
|
|
||||||
|
if(!mp_texture)
|
||||||
|
|
||||||
|
if(!mp_texture->BindUBO("tex",ubo_camera_info))return(false);
|
||||||
|
|
||||||
|
mp_texture->Update();
|
||||||
|
}
|
||||||
|
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
@ -90,8 +98,17 @@ private:
|
|||||||
if(!ubo_camera_info)
|
if(!ubo_camera_info)
|
||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
if(!material_instance->BindUBO("camera",ubo_camera_info))return(false);
|
{
|
||||||
material_instance->Update();
|
MaterialParameters *mp_global=material_instance->GetMP(DescriptorSetsType::Global);
|
||||||
|
|
||||||
|
if(!mp_global)
|
||||||
|
return(false);
|
||||||
|
|
||||||
|
if(!mp_global->BindUBO("g_camera",ubo_camera_info))return(false);
|
||||||
|
|
||||||
|
mp_global->Update();
|
||||||
|
}
|
||||||
|
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
res
2
res
@ -1 +1 @@
|
|||||||
Subproject commit 897770ef1d59af09b4863c34fc3040466b95b437
|
Subproject commit 27da09e0b6027a5651a030334d5026adef2aaff7
|
Loading…
x
Reference in New Issue
Block a user