Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/renderer/DecalRData.cpp
Show First 20 Lines • Show All 232 Lines • ▼ Show 20 Lines | for (int pass = 0; pass < numPasses; ++pass) | ||||
batch.vertices->m_Owner->UploadIfNeeded(deviceCommandContext); | batch.vertices->m_Owner->UploadIfNeeded(deviceCommandContext); | ||||
const uint32_t stride = sizeof(SDecalVertex); | const uint32_t stride = sizeof(SDecalVertex); | ||||
deviceCommandContext->SetVertexAttributeFormat( | deviceCommandContext->SetVertexAttributeFormat( | ||||
Renderer::Backend::VertexAttributeStream::POSITION, | Renderer::Backend::VertexAttributeStream::POSITION, | ||||
Renderer::Backend::Format::R32G32B32_SFLOAT, | Renderer::Backend::Format::R32G32B32_SFLOAT, | ||||
offsetof(SDecalVertex, m_Position), stride, 0); | offsetof(SDecalVertex, m_Position), stride, | ||||
Renderer::Backend::VertexAttributeRate::PER_VERTEX, 0); | |||||
deviceCommandContext->SetVertexAttributeFormat( | deviceCommandContext->SetVertexAttributeFormat( | ||||
Renderer::Backend::VertexAttributeStream::NORMAL, | Renderer::Backend::VertexAttributeStream::NORMAL, | ||||
Renderer::Backend::Format::R32G32B32_SFLOAT, | Renderer::Backend::Format::R32G32B32_SFLOAT, | ||||
offsetof(SDecalVertex, m_Normal), stride, 0); | offsetof(SDecalVertex, m_Normal), stride, | ||||
Renderer::Backend::VertexAttributeRate::PER_VERTEX, 0); | |||||
deviceCommandContext->SetVertexAttributeFormat( | deviceCommandContext->SetVertexAttributeFormat( | ||||
Renderer::Backend::VertexAttributeStream::UV0, | Renderer::Backend::VertexAttributeStream::UV0, | ||||
Renderer::Backend::Format::R32G32_SFLOAT, | Renderer::Backend::Format::R32G32_SFLOAT, | ||||
offsetof(SDecalVertex, m_UV), stride, 0); | offsetof(SDecalVertex, m_UV), stride, | ||||
Renderer::Backend::VertexAttributeRate::PER_VERTEX, 0); | |||||
deviceCommandContext->SetVertexBuffer(0, batch.vertices->m_Owner->GetBuffer()); | deviceCommandContext->SetVertexBuffer(0, batch.vertices->m_Owner->GetBuffer()); | ||||
} | } | ||||
if (lastIB != batch.indices->m_Owner) | if (lastIB != batch.indices->m_Owner) | ||||
{ | { | ||||
lastIB = batch.indices->m_Owner; | lastIB = batch.indices->m_Owner; | ||||
batch.indices->m_Owner->UploadIfNeeded(deviceCommandContext); | batch.indices->m_Owner->UploadIfNeeded(deviceCommandContext); | ||||
▲ Show 20 Lines • Show All 115 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator