Fixes vertex attribute format mismatch for silhouette debug rendering.
This was SVN commit r27331.
This commit is contained in:
parent
ca242239f1
commit
e4ded1f971
@ -493,7 +493,7 @@ void SilhouetteRenderer::RenderDebugOverlays(
|
||||
{
|
||||
deviceCommandContext->SetUniform(
|
||||
colorBindingSlot, r.color.AsFloatArray());
|
||||
u16 verts[] =
|
||||
const float vertices[] =
|
||||
{
|
||||
r.x0, r.y0,
|
||||
r.x1, r.y0,
|
||||
@ -505,11 +505,11 @@ void SilhouetteRenderer::RenderDebugOverlays(
|
||||
|
||||
deviceCommandContext->SetVertexAttributeFormat(
|
||||
Renderer::Backend::VertexAttributeStream::POSITION,
|
||||
Renderer::Backend::Format::R16G16_SINT, 0, 0,
|
||||
Renderer::Backend::Format::R32G32_SFLOAT, 0, sizeof(float) * 2,
|
||||
Renderer::Backend::VertexAttributeRate::PER_VERTEX, 0);
|
||||
|
||||
deviceCommandContext->SetVertexBufferData(
|
||||
0, verts, std::size(verts) * sizeof(verts[0]));
|
||||
0, vertices, std::size(vertices) * sizeof(vertices[0]));
|
||||
|
||||
deviceCommandContext->Draw(0, 6);
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ private:
|
||||
struct DebugRect
|
||||
{
|
||||
CColor color;
|
||||
u16 x0, y0, x1, y1;
|
||||
float x0, y0, x1, y1;
|
||||
};
|
||||
|
||||
std::vector<DebugBounds> m_DebugBounds;
|
||||
|
Loading…
Reference in New Issue
Block a user