This Week in Quads #7

🔗macroquad's set_uniform arrays

Now it is possible to create materials with arrays in uniforms and to set those uniforms by normal macroquad code.

material.set_uniform("Color", color)
material.set_uniform_array("Lights", &light_positions[..]);

example

PR with description

🔗egui-miniquad crates.io release

egui-miniquad compatible with the latest miniquad got crates.io release.

Release link

🔗Road to 3d macroquad

🔗Gizmos

First look onto the gizmos API - a special, no context, no parametrisation way to draw debug UI.

gizmos gizmos

A new gizmo example

🔗non-exclusive immidiate mode

Non-exclusive macroquad-0.4 comaptibility mode allows using the old API alongside the new one, porting old code to new API part by part.

async fn game(ctx: macroquad::Context) {
-    init_compat_mode(ctx);
+    init_compat_mode(&ctx);

    loop {
        clear_background(LIGHTGRAY);

        draw_line(40.0, 40.0, 100.0, 200.0, 15.0, BLUE);
        draw_rectangle(screen_width() / 2.0 - 60.0, 100.0, 120.0, 60.0, GREEN);
        draw_circle(screen_width() - 30.0, screen_height() - 30.0, 15.0, YELLOW);
        draw_text("HELLO", 20.0, 20.0, 30.0, DARKGRAY);

        next_frame().await
    }
}