From c76efec19002adcbe637534a3abddb92014aadc3 Mon Sep 17 00:00:00 2001 From: John Tsiombikas Date: Thu, 15 Feb 2018 07:02:47 +0200 Subject: [PATCH] removed redundant immediate mode draw_cube from infcubes --- src/infcubes.c | 43 ------------------------------------------- 1 file changed, 43 deletions(-) diff --git a/src/infcubes.c b/src/infcubes.c index e55b1bc..4da85c6 100644 --- a/src/infcubes.c +++ b/src/infcubes.c @@ -106,46 +106,3 @@ static void draw(void) swap_buffers(fb_pixels); } - -static void draw_cube(float sz) -{ - float hsz = sz * 0.5f; - g3d_begin(G3D_QUADS); - g3d_color3b(255, 0, 0); - g3d_normal(0, 0, 1); - g3d_texcoord(0, 0); g3d_vertex(-hsz, -hsz, hsz); - g3d_texcoord(1, 0); g3d_vertex(hsz, -hsz, hsz); - g3d_texcoord(1, 1); g3d_vertex(hsz, hsz, hsz); - g3d_texcoord(0, 1); g3d_vertex(-hsz, hsz, hsz); - g3d_color3b(0, 255, 0); - g3d_normal(1, 0, 0); - g3d_texcoord(0, 0); g3d_vertex(hsz, -hsz, hsz); - g3d_texcoord(1, 0); g3d_vertex(hsz, -hsz, -hsz); - g3d_texcoord(1, 1); g3d_vertex(hsz, hsz, -hsz); - g3d_texcoord(0, 1); g3d_vertex(hsz, hsz, hsz); - g3d_color3b(0, 0, 255); - g3d_normal(0, 0, -1); - g3d_texcoord(0, 0); g3d_vertex(hsz, -hsz, -hsz); - g3d_texcoord(1, 0); g3d_vertex(-hsz, -hsz, -hsz); - g3d_texcoord(1, 1); g3d_vertex(-hsz, hsz, -hsz); - g3d_texcoord(0, 1); g3d_vertex(hsz, hsz, -hsz); - g3d_color3b(255, 0, 255); - g3d_normal(-1, 0, 0); - g3d_texcoord(0, 0); g3d_vertex(-hsz, -hsz, -hsz); - g3d_texcoord(1, 0); g3d_vertex(-hsz, -hsz, hsz); - g3d_texcoord(1, 1); g3d_vertex(-hsz, hsz, hsz); - g3d_texcoord(0, 1); g3d_vertex(-hsz, hsz, -hsz); - g3d_color3b(255, 255, 0); - g3d_normal(0, 1, 0); - g3d_texcoord(0, 0); g3d_vertex(-hsz, hsz, hsz); - g3d_texcoord(1, 0); g3d_vertex(hsz, hsz, hsz); - g3d_texcoord(1, 1); g3d_vertex(hsz, hsz, -hsz); - g3d_texcoord(0, 1); g3d_vertex(-hsz, hsz, -hsz); - g3d_color3b(0, 255, 255); - g3d_normal(0, -1, 0); - g3d_texcoord(0, 0); g3d_vertex(hsz, -hsz, hsz); - g3d_texcoord(1, 0); g3d_vertex(-hsz, -hsz, hsz); - g3d_texcoord(1, 1); g3d_vertex(-hsz, -hsz, -hsz); - g3d_texcoord(0, 1); g3d_vertex(hsz, -hsz, -hsz); - g3d_end(); -} -- 1.7.10.4