2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-15 00:06:09 +00:00

Additional work on CMapWorld rendering

This commit is contained in:
Jack Andersen
2017-04-22 11:46:18 -10:00
parent 337ffd1c16
commit d54bb3746c
19 changed files with 391 additions and 105 deletions

View File

@@ -109,17 +109,29 @@ struct MetalLineDataBindingFactory : CLineRendererShaders::IDataBindingFactory
int texCount = 0;
boo::ITexture* textures[1];
std::pair<boo::IGraphicsBufferD*, hecl::VertexBufferPool<CLineRenderer::SDrawVertTex>::IndexTp> vbufInfo;
std::pair<boo::IGraphicsBufferD*, hecl::UniformBufferPool<CLineRenderer::SDrawUniform>::IndexTp> ubufInfo =
renderer.m_uniformBuf.getBufferInfo();
if (texture)
{
vbufInfo = renderer.m_vertBufTex.getBufferInfo();
textures[0] = texture;
texCount = 1;
}
else
{
vbufInfo = renderer.m_vertBufNoTex.getBufferInfo();
}
boo::IGraphicsBuffer* uniforms[] = {renderer.m_uniformBuf};
boo::IGraphicsBuffer* uniforms[] = {ubufInfo.first};
boo::PipelineStage stages[] = {boo::PipelineStage::Vertex};
size_t ubufOffs[] = {ubufInfo.second};
size_t ubufSizes[] = {sizeof(CLineRenderer::SDrawUniform)};
renderer.m_shaderBind = ctx.newShaderDataBinding(pipeline, nullptr, renderer.m_vertBuf,
nullptr, nullptr, 1, uniforms, nullptr,
texCount, textures, nullptr, nullptr);
renderer.m_shaderBind = ctx.newShaderDataBinding(pipeline, nullptr, vbufInfo.first,
nullptr, nullptr, 1, uniforms, stages,
ubufOffs, ubufSizes, texCount, textures,
nullptr, nullptr, vbufInfo.second);
}
};