diff options
| author | Jack Jamison <jackqjamison@gmail.com> | 2025-10-19 23:02:44 -0400 |
|---|---|---|
| committer | Jack Jamison <jackqjamison@gmail.com> | 2025-10-19 23:02:44 -0400 |
| commit | c47c01918eb271d3344923638c382fcc2f70487b (patch) | |
| tree | 1992697f2859d7a2f726364d604ef56afe865f73 /graphics.c | |
| parent | 6e6830eabed6ee8a38bebfa677dc3eaee322ec6c (diff) | |
sort by smallest
Diffstat (limited to 'graphics.c')
| -rw-r--r-- | graphics.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -224,20 +224,23 @@ void render_frame(client_state *state) { glBindVertexArray(item->text_buffer.vao); glUniform2f(state->offset_uniform, x + state->horizontal_spacing / 2.0f, y - state->atlas.vert_shift); if (i == state->selected_filtered_item) { - glUniform3f(state->color_uniform, 1.0f, 1.0f, 1.0f); + // draw box glScissor(x, y, ((state->lines > 0) ? state->width : item->pixel_len + state->horizontal_spacing), state->line_height); glClearColor(0.0f, 0.4f, 0.8f, 1.0); glClear(GL_COLOR_BUFFER_BIT); - } - glDrawElements(GL_TRIANGLES, item->text_buffer.num_elements, GL_UNSIGNED_INT, 0); - if (i == state->selected_filtered_item) { - glUniform3f(state->color_uniform, 1.0f, 1.0f, 1.0f); if (state->lines > 0) { glScissor(0, 0, state->width, input_y); } else { glScissor(input_width, 0, state->width, state->line_height); } + + // draw text + glDrawElements(GL_TRIANGLES, item->text_buffer.num_elements, GL_UNSIGNED_INT, 0); + } else { + + // draw text + glDrawElements(GL_TRIANGLES, item->text_buffer.num_elements, GL_UNSIGNED_INT, 0); } } |
