revert accidental commits, assert for zero-sized build_vertex_buffer(), explain the TODO on no-clear on skybox present
This commit is contained in:
parent
60716c6d7b
commit
aef3f6444e
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user