Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/graphics/TextRenderer.cpp
Show First 20 Lines • Show All 271 Lines • ▼ Show 20 Lines | for (std::list<SBatch>::iterator it = m_Batches.begin(); it != m_Batches.end(); ++it) | ||||
{ | { | ||||
if (idx == 0) | if (idx == 0) | ||||
return; | return; | ||||
const uint32_t stride = sizeof(t2f_v2i); | const uint32_t stride = sizeof(t2f_v2i); | ||||
deviceCommandContext->SetVertexAttributeFormat( | deviceCommandContext->SetVertexAttributeFormat( | ||||
Renderer::Backend::VertexAttributeStream::POSITION, | Renderer::Backend::VertexAttributeStream::POSITION, | ||||
Renderer::Backend::Format::R16G16_SINT, offsetof(t2f_v2i, x), stride, 0); | Renderer::Backend::Format::R16G16_SINT, offsetof(t2f_v2i, x), stride, | ||||
Renderer::Backend::VertexAttributeRate::PER_VERTEX, 0); | |||||
deviceCommandContext->SetVertexAttributeFormat( | deviceCommandContext->SetVertexAttributeFormat( | ||||
Renderer::Backend::VertexAttributeStream::UV0, | Renderer::Backend::VertexAttributeStream::UV0, | ||||
Renderer::Backend::Format::R32G32_SFLOAT, offsetof(t2f_v2i, u), stride, 0); | Renderer::Backend::Format::R32G32_SFLOAT, offsetof(t2f_v2i, u), stride, | ||||
Renderer::Backend::VertexAttributeRate::PER_VERTEX, 0); | |||||
deviceCommandContext->SetVertexBufferData(0, vertexes.data()); | deviceCommandContext->SetVertexBufferData( | ||||
deviceCommandContext->SetIndexBufferData(indexes.data()); | 0, vertexes.data(), vertexes.size() * sizeof(vertexes[0])); | ||||
deviceCommandContext->SetIndexBufferData(indexes.data(), indexes.size() * sizeof(indexes[0])); | |||||
deviceCommandContext->DrawIndexed(0, idx * 6, 0); | deviceCommandContext->DrawIndexed(0, idx * 6, 0); | ||||
idx = 0; | idx = 0; | ||||
}; | }; | ||||
for (std::list<SBatchRun>::iterator runit = batch.runs.begin(); runit != batch.runs.end(); ++runit) | for (std::list<SBatchRun>::iterator runit = batch.runs.begin(); runit != batch.runs.end(); ++runit) | ||||
{ | { | ||||
SBatchRun& run = *runit; | SBatchRun& run = *runit; | ||||
▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator