diff options
| author | Jack Jamison <jackqjamison@gmail.com> | 2025-10-17 22:55:48 -0400 |
|---|---|---|
| committer | Jack Jamison <jackqjamison@gmail.com> | 2025-10-17 22:55:48 -0400 |
| commit | 9cdc8540fa3f7d36d48b44f9e955652b6e17dd91 (patch) | |
| tree | c2e81b97187390d2a7d74c4872823f84f64fa75f /graphics.c | |
| parent | 01f4ab89dd2c668e64af5459a615e50eb630dfc1 (diff) | |
item filtering
Diffstat (limited to 'graphics.c')
| -rw-r--r-- | graphics.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -158,7 +158,7 @@ void render_frame(client_state *state) { glUniform2f(state->offset_uniform, pen_x, pen_y); glDrawElements(GL_TRIANGLES, state->input_buffer_grafix.num_elements, GL_UNSIGNED_INT, 0); - // set up drawing for options + // set up starting pen and scissor for options if (state->lines > 0) { glScissor(0, 0, state->width, pen_y); pen_y -= state->line_height; @@ -170,7 +170,8 @@ void render_frame(client_state *state) { } // draw options - array_for_all(item_t, item, state->items) { + array_for_all(uint32_t, i, state->filtered_items) { + item_t* item = &state->items[*i]; glBindVertexArray(item->text_buffer.vao); glUniform2f(state->offset_uniform, pen_x, pen_y); glDrawElements(GL_TRIANGLES, item->text_buffer.num_elements, GL_UNSIGNED_INT, 0); |
