medfall

A super great game engine
Log | Files | Refs

commit b1f9cf2dbb622af3dc0b26e1ed83282a31ff0b29
parent 6945eaa60ea982902699966c701ef8712ef5c20c
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Thu Aug 31 23:15:50 +0300

Back to orphaning, unsync mapping does not work without fences

Diffstat:
renderer.cc | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/renderer.cc b/renderer.cc @@ -102,7 +102,6 @@ static void bind_fb( FB fb ) { void renderer_init() { glGenBuffers( 1, &uniforms ); glBindBuffer( GL_UNIFORM_BUFFER, uniforms ); - glBufferData( GL_UNIFORM_BUFFER, UNIFORM_BUFFER_SIZE, NULL, GL_DYNAMIC_DRAW ); in_frame = false; in_pass = false; @@ -124,8 +123,8 @@ void renderer_begin_frame() { deletes.clear(); render_passes.clear(); - GLbitfield bits = GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT | GL_MAP_UNSYNCHRONIZED_BIT; - uniforms_buffer = ( u8 * ) glMapBufferRange( GL_UNIFORM_BUFFER, 0, UNIFORM_BUFFER_SIZE, bits ); + glBufferData( GL_UNIFORM_BUFFER, UNIFORM_BUFFER_SIZE, NULL, GL_DYNAMIC_DRAW ); + uniforms_buffer = ( u8 * ) glMapBuffer( GL_UNIFORM_BUFFER, GL_WRITE_ONLY ); ASSERT( uniforms_buffer != NULL ); uniforms_offset = 0; }