less stupid code

This commit is contained in:
2023-09-08 01:51:09 +02:00
parent fe99a4c9ff
commit 978f60d762
3 changed files with 15 additions and 22 deletions
+9 -2
View File
@@ -68,8 +68,15 @@ int main() {
glClearColor(0.0, 0.0, 0.0, 1.0);
glClear(GL_COLOR_BUFFER_BIT);
draw_bg_rect(board_shader, board_vao, x_scale, y_scale);
draw_bg_lines(grid_shader, x_scale, y_scale, width < height ? width : height);
float transform[4][4] = {
{x_scale, 0, 0, 0},
{0, y_scale, 0, 0},
{0, 0, 1, 0},
{0, 0, 0, 1},
};
draw_bg_rect(board_shader, board_vao, (float *)transform);
draw_bg_lines(grid_shader, (float *)transform, width < height ? width : height);
glXSwapBuffers(display, window);
}