Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_batch_presets.c
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
| const int box_margin = max_ii(round_fl_to_int((float)(px_zoom * 2.0f)), px); | const int box_margin = max_ii(round_fl_to_int((float)(px_zoom * 2.0f)), px); | ||||
| const int box_size = max_ii(round_fl_to_int((width / 8.0f) - px), px); | const int box_size = max_ii(round_fl_to_int((width / 8.0f) - px), px); | ||||
| const int y_ofs = max_ii(round_fl_to_int(width / 2.5f), px); | const int y_ofs = max_ii(round_fl_to_int(width / 2.5f), px); | ||||
| const int x_ofs = y_ofs; | const int x_ofs = y_ofs; | ||||
| int i_x, i_y; | int i_x, i_y; | ||||
| for (i_x = 0; i_x < 4; i_x++) { | for (i_x = 0; i_x < 2; i_x++) { | ||||
| for (i_y = 0; i_y < 2; i_y++) { | for (i_y = 0; i_y < 4; i_y++) { | ||||
| const int x_co = (x_ofs) + (i_x * (box_size + box_margin)); | const int x_co = (x_ofs) + (i_x * (box_size + box_margin)); | ||||
| const int y_co = (y_ofs) + (i_y * (box_size + box_margin)); | const int y_co = (y_ofs) + (i_y * (box_size + box_margin)); | ||||
| gpu_batch_preset_rectf_tris_color_ex(&pos_step, | gpu_batch_preset_rectf_tris_color_ex(&pos_step, | ||||
| x_co - box_size, | x_co - box_size, | ||||
| y_co - px_zoom, | y_co - px_zoom, | ||||
| x_co, | x_co, | ||||
| (y_co + box_size) - px_zoom, | (y_co + box_size) - px_zoom, | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||