From ba8201aceebe65e0484bf93566a8d4f6552d6819 Mon Sep 17 00:00:00 2001 From: Zack Buhman Date: Tue, 3 Sep 2024 23:26:29 -0500 Subject: [PATCH] cube: enable backface culling --- arm9/examples/cube.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arm9/examples/cube.c b/arm9/examples/cube.c index 05aaee0..e01d274 100644 --- a/arm9/examples/cube.c +++ b/arm9/examples/cube.c @@ -89,12 +89,11 @@ void main() // set the depth buffer clear value to the maximum value io_registers.a.CLEAR_DEPTH = CLEAR_DEPTH__value(0x7fff); - // the following polygons are fully opaque and are not - // backface-culled + // the following polygons are fully opaque; backface culling is + // enabled io_registers.a.POLYGON_ATTR = 0 | POLYGON_ATTR__alpha_value(31) - | POLYGON_ATTR__render_front_surface__enable - | POLYGON_ATTR__render_back_surface__enable; + | POLYGON_ATTR__render_front_surface__enable; // the 3d viewport is the entire display area io_registers.a.VIEWPORT = 0