mirror of https://github.com/axmolengine/axmol.git
fix attribute location (#20064)
This commit is contained in:
parent
6d8b1f5b9d
commit
66c4892b22
|
@ -41,8 +41,16 @@ NavMeshDebugDraw::NavMeshDebugDraw()
|
|||
_locMVP = _programState->getUniformLocation("u_MVPMatrix");
|
||||
|
||||
auto vertexLayout = _programState->getVertexLayout();
|
||||
vertexLayout->setAttribute("a_position", 0, backend::VertexFormat::FLOAT3, offsetof(V3F_C4F, position), false);
|
||||
vertexLayout->setAttribute("a_color", 1, backend::VertexFormat::FLOAT4, offsetof(V3F_C4F, color), false);
|
||||
vertexLayout->setAttribute("a_position",
|
||||
_programState->getAttributeLocation("a_position"),
|
||||
backend::VertexFormat::FLOAT3,
|
||||
offsetof(V3F_C4F, position),
|
||||
false);
|
||||
vertexLayout->setAttribute("a_color",
|
||||
_programState->getAttributeLocation("a_color"),
|
||||
backend::VertexFormat::FLOAT4,
|
||||
offsetof(V3F_C4F, color),
|
||||
false);
|
||||
vertexLayout->setLayout(sizeof(V3F_C4F));
|
||||
|
||||
_beforeCommand.func = CC_CALLBACK_0(NavMeshDebugDraw::onBeforeVisitCmd, this);
|
||||
|
|
Loading…
Reference in New Issue