mirror of https://github.com/bjornbytes/lovr.git
Fix CMakeLists; Fix buffer unmapping; Formatting;
This commit is contained in:
parent
e3e52a7808
commit
1792f066f2
|
@ -361,6 +361,8 @@ if(LOVR_ENABLE_AUDIO)
|
|||
add_definitions(-DLOVR_ENABLE_AUDIO)
|
||||
target_sources(lovr PRIVATE
|
||||
src/audio/audio.c
|
||||
src/audio/source.c
|
||||
src/audio/microphone.c
|
||||
src/api/audio.c
|
||||
src/api/types/source.c
|
||||
src/api/types/microphone.c
|
||||
|
|
|
@ -603,7 +603,6 @@ void lovrGraphicsFlush() {
|
|||
lovrBufferUnmap(state.buffers[i]);
|
||||
}
|
||||
|
||||
|
||||
for (int b = 0; b < batchCount; b++) {
|
||||
Batch* batch = &state.batches[b];
|
||||
BatchParams* params = &batch->params;
|
||||
|
|
|
@ -1616,7 +1616,8 @@ void lovrBufferUnmap(Buffer* buffer) {
|
|||
glFlushMappedBufferRange(convertBufferType(buffer->type), buffer->flushFrom, buffer->flushTo - buffer->flushFrom);
|
||||
}
|
||||
|
||||
if (!GLAD_GL_ARB_buffer_storage) {
|
||||
if (!GLAD_GL_ARB_buffer_storage && buffer->mapped) {
|
||||
lovrGpuBindBuffer(buffer->type, buffer->id);
|
||||
glUnmapBuffer(convertBufferType(buffer->type));
|
||||
buffer->mapped = false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue