Added PipelineInfo::vertexAttributes and PipelineInfo::modelFormat

KRPipelineManager::getPipeline now has just one version with two arguments.
Commented out GL version of getPipeline, to be later merged into the Vulkan version.
This commit is contained in:
2022-07-05 21:27:41 -07:00
parent ad64ab506a
commit bbc0de400c
4 changed files with 15 additions and 7 deletions

View File

@@ -229,7 +229,9 @@ void KRCamera::renderFrame(VkCommandBuffer& commandBuffer, KRSurface& compositeS
info.pCamera = this;
info.renderPass = KRNode::RENDER_PASS_FORWARD_TRANSPARENT;
info.rasterMode = PipelineInfo::RasterMode::kAlphaBlend;
KRPipeline* testPipeline = m_pContext->getPipelineManager()->getPipeline(compositeSurface, info, testVertices.getVertexAttributes(), KRMesh::model_format_t::KRENGINE_MODEL_FORMAT_STRIP);
info.vertexAttributes = testVertices.getVertexAttributes();
info.modelFormat = KRMesh::model_format_t::KRENGINE_MODEL_FORMAT_STRIP;
KRPipeline* testPipeline = m_pContext->getPipelineManager()->getPipeline(compositeSurface, info);
testPipeline->bind(commandBuffer);
testVertices.bind(commandBuffer);
vkCmdDraw(commandBuffer, 4, 1, 0, 0);