WIP Creating structures in KRPipeline to cache descriptor set binding reflection data.

Added stub function, KRPipeline::setImageBinding
This commit is contained in:
2022-09-15 20:33:41 -07:00
parent 183f7057e2
commit 8306202cf1
5 changed files with 103 additions and 40 deletions

View File

@@ -723,6 +723,9 @@ void KRCamera::renderPost(VkCommandBuffer& commandBuffer, KRSurface& surface)
}
}
KRTexture* fontTexture = m_pContext->getTextureManager()->getTexture("font");
fontTexture->resetPoolExpiry(0.0f, KRTexture::TEXTURE_USAGE_UI);
PipelineInfo info{};
std::string shader_name("debug_font");
info.shader_name = &shader_name;
@@ -733,10 +736,9 @@ void KRCamera::renderPost(VkCommandBuffer& commandBuffer, KRSurface& surface)
info.vertexAttributes = (1 << KRMesh::KRENGINE_ATTRIB_VERTEX) | (1 << KRMesh::KRENGINE_ATTRIB_TEXUVA);
info.modelFormat = ModelFormat::KRENGINE_MODEL_FORMAT_TRIANGLES;
KRPipeline* fontShader = m_pContext->getPipelineManager()->getPipeline(surface, info);
fontShader->setImageBinding("fontTexture", fontTexture, getContext().getSamplerManager()->DEFAULT_CLAMPED_SAMPLER);
fontShader->bind(commandBuffer, *this, m_viewport, Matrix4(), nullptr, nullptr, nullptr, KRNode::RENDER_PASS_FORWARD_TRANSPARENT);
m_pContext->getTextureManager()->selectTexture(0, m_pContext->getTextureManager()->getTexture("font"), 0.0f, KRTexture::TEXTURE_USAGE_UI);
m_debug_text_vbo_data.load(commandBuffer);
m_debug_text_vbo_data.bind(commandBuffer);