[gtk/layout-manager-transform-demo] layoutmanager demo: Cull backfaces
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/layout-manager-transform-demo] layoutmanager demo: Cull backfaces
- Date: Sat, 29 Aug 2020 04:13:17 +0000 (UTC)
commit 6c5f191ffaf7ba2efd9651eca048b0e7a5fe6292
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Aug 29 00:12:51 2020 -0400
layoutmanager demo: Cull backfaces
demos/gtk-demo/demo2layout.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/demos/gtk-demo/demo2layout.c b/demos/gtk-demo/demo2layout.c
index 7cf92ba720..f0dedf5e68 100644
--- a/demos/gtk-demo/demo2layout.c
+++ b/demos/gtk-demo/demo2layout.c
@@ -101,6 +101,9 @@ demo2_layout_allocate (GtkLayoutManager *layout_manager,
p_1 = RADIANS (offset + 10 * k);
p_2 = RADIANS (offset + 10 * (k + 1));
+ if (SZ (r, t_1, p_1) > 0)
+ continue;
+
graphene_point3d_init (&q1, x0 + SX (r, t_1, p_1), y0 + SY (r, t_1, p_1), SZ (r, t_1, p_1));
graphene_point3d_init (&q2, x0 + SX (r, t_2, p_1), y0 + SY (r, t_2, p_1), SZ (r, t_2, p_1));
graphene_point3d_init (&q3, x0 + SX (r, t_1, p_2), y0 + SY (r, t_1, p_2), SZ (r, t_1, p_2));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]