- fix use after delete
This commit is contained in:
parent
117617aad8
commit
9f8cd68211
5 changed files with 71 additions and 15 deletions
|
|
@ -76,14 +76,12 @@ void PolyBuffer::Unlock()
|
|||
|
||||
void PolyVertexBuffer::SetFormat(int numBindingPoints, int numAttributes, size_t stride, const FVertexBufferAttribute *attrs)
|
||||
{
|
||||
for (int j = 0; j < numAttributes; j++)
|
||||
{
|
||||
mOffsets[attrs[j].location] = attrs[j].offset;
|
||||
}
|
||||
mStride = stride;
|
||||
VertexFormat = GetPolyFrameBuffer()->GetRenderState()->GetVertexFormat(numBindingPoints, numAttributes, stride, attrs);
|
||||
}
|
||||
|
||||
void PolyVertexBuffer::Load(PolyTriangleThreadData *thread, const void *vertices, int index)
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void PolyVertexInputAssembly::Load(PolyTriangleThreadData *thread, const void *vertices, int index)
|
||||
{
|
||||
const uint8_t *vertex = static_cast<const uint8_t*>(vertices) + mStride * index;
|
||||
const float *attrVertex = reinterpret_cast<const float*>(vertex + mOffsets[VATTR_VERTEX]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue