Skip to content

Commit

Permalink
#5584: Fix crash selecting patches
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Nov 19, 2021
1 parent cb3ecde commit 0dc861d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions radiantcore/rendersystem/backend/SurfaceRenderer.h
Expand Up @@ -160,12 +160,11 @@ class SurfaceRenderer :

glFrontFace(GL_CW);

glVertexPointer(3, GL_DOUBLE, sizeof(ArbitraryMeshVertex), &buffer.vertices[slotInfo.firstVertex].vertex);
glTexCoordPointer(2, GL_DOUBLE, sizeof(ArbitraryMeshVertex), &buffer.vertices[slotInfo.firstVertex].texcoord);
glNormalPointer(GL_DOUBLE, sizeof(ArbitraryMeshVertex), &buffer.vertices[slotInfo.firstVertex].normal);
glVertexPointer(3, GL_DOUBLE, sizeof(ArbitraryMeshVertex), &buffer.vertices.front().vertex);
glTexCoordPointer(2, GL_DOUBLE, sizeof(ArbitraryMeshVertex), &buffer.vertices.front().texcoord);
glNormalPointer(GL_DOUBLE, sizeof(ArbitraryMeshVertex), &buffer.vertices.front().normal);

glDrawElements(buffer.mode, static_cast<GLsizei>(slotInfo.numIndices), GL_UNSIGNED_INT, &buffer.indices[slotInfo.firstIndex]);

glDisableClientState(GL_NORMAL_ARRAY);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
}
Expand Down

0 comments on commit 0dc861d

Please sign in to comment.