Skip to content

Commit

Permalink
unmap before delete
Browse files Browse the repository at this point in the history
  • Loading branch information
RogueLogix committed Mar 13, 2024
1 parent 0f39ec1 commit 66bd214
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,11 @@ public static void collectAllFeedback(boolean shadowsEnabled) {
return feedbackBuffer;
});
if (buffer.size < requiredVertices) {
buffer.delete();
if (QuartzCore.TESTING_ALLOWED) {
PointerWrapper.removeReadableLocation(new PointerWrapper(renderTypeFeedbackBufferMappings.getLong(renderType), buffer.size));
glUnmapNamedBuffer(buffer.buffer);
}
buffer.delete();
buffer = new FeedbackBuffer(requiredVertices);
if (QuartzCore.TESTING_ALLOWED) {
final long mappedPtr = nglMapNamedBufferRange(buffer.buffer, 0, buffer.size, GL_MAP_READ_BIT | GL_MAP_PERSISTENT_BIT | GL_MAP_COHERENT_BIT);
Expand Down

0 comments on commit 66bd214

Please sign in to comment.