draw: increase far Z, separate path for space quads, fix billboard batching

This commit is contained in:
veclavtalica
2025-02-26 13:27:09 +03:00
parent 5f3920fdba
commit a36459397e
10 changed files with 190 additions and 59 deletions

View File

@ -584,8 +584,8 @@ void finally_draw_command(DeferredCommandDraw command) {
finally_use_texture_mode(command.texture_mode);
glBindBuffer(GL_ARRAY_BUFFER, command.vertices.buffer);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, command.element_buffer);
glBindBuffer(GL_ARRAY_BUFFER, command.vertices.buffer);
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(command.vertices.arity,
@ -637,7 +637,7 @@ void finally_draw_command(DeferredCommandDraw command) {
command.range_start,
command.range_end,
command.element_count,
GL_UNSIGNED_SHORT,
GL_UNSIGNED_INT,
NULL);
} else {
SDL_assert(command.primitive_count != 0);
@ -661,6 +661,7 @@ void finally_draw_command(DeferredCommandDraw command) {
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
}
void render_line(const LinePrimitive *line) {
finally_use_2d_pipeline();
glBegin(GL_LINES);