Skip to content

Commit ecf22a5

Browse files
authored
Merge pull request #44 from MyNameIsTrez/master
Back to using faster `mlx_lstadd_front`
2 parents 13e2650 + b3c5952 commit ecf22a5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/mlx_images.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/* By: W2Wizard <[email protected]> +#+ */
77
/* +#+ */
88
/* Created: 2022/01/21 15:34:45 by W2Wizard #+# #+# */
9-
/* Updated: 2022/07/28 16:40:17 by lde-la-h ######## odam.nl */
9+
/* Updated: 2022/07/28 18:26:59 by sbos ######## odam.nl */
1010
/* */
1111
/* ************************************************************************** */
1212

@@ -148,10 +148,11 @@ int32_t mlx_image_to_window(mlx_t* mlx, mlx_image_t* img, int32_t x, int32_t y)
148148
img->instances[index].enabled = true;
149149

150150
// Add draw call...
151+
sort_queue = true;
151152
mlx_list_t* templst;
152153
if ((templst = mlx_lstnew(queue)))
153154
{
154-
mlx_lstadd_back(&((mlx_ctx_t*)mlx->context)->render_queue, templst);
155+
mlx_lstadd_front(&((mlx_ctx_t*)mlx->context)->render_queue, templst);
155156
return (index);
156157
}
157158
return (mlx_freen(2, instances, queue), mlx_error(MLX_MEMFAIL), -1);

0 commit comments

Comments
 (0)