diff --git a/src/rendering/twn_gl_15_rendering.c b/src/rendering/twn_gl_15_rendering.c index 7855414..35fe2c0 100644 --- a/src/rendering/twn_gl_15_rendering.c +++ b/src/rendering/twn_gl_15_rendering.c @@ -243,10 +243,9 @@ void use_texture_mode(TextureMode mode) { VertexBufferBuilder build_vertex_buffer(VertexBuffer buffer, size_t bytes) { + SDL_assert(bytes != 0); glBindBuffer(GL_ARRAY_BUFFER, buffer); glBufferData(GL_ARRAY_BUFFER, bytes, NULL, GL_STREAM_DRAW); - if (bytes == 0) - SDL_TriggerBreakpoint(); void *mapping = glMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY); if (!mapping) CRY("build_vertex_buffer", "Error mapping a vertex array buffer"); @@ -282,8 +281,7 @@ void finally_render_sprites(const Primitive2D primitives[], const struct SpriteBatch batch, const VertexBuffer buffer) { - /* TODO: maybe do, dunno */ - // glBindBuffer(GL_VERTEX_ARRAY, vertex_buffer); + (void)buffer; GLsizei off; GLsizei voff; diff --git a/src/rendering/twn_gl_any_rendering.c b/src/rendering/twn_gl_any_rendering.c index b7593c9..63071f9 100644 --- a/src/rendering/twn_gl_any_rendering.c +++ b/src/rendering/twn_gl_any_rendering.c @@ -70,6 +70,9 @@ void clear_draw_buffer(void) { (1.0f / 255) * 230, (1.0f / 255) * 230, 1); + /* TODO: don't clear color when skybox is applied? */ + /* for that window should match framebuffer */ + /* also it is driver dependent, from what i can gather */ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);