From 0e2583041db908311ce46cb7b65cf2864c9c394a Mon Sep 17 00:00:00 2001 From: Sean Barrett Date: Sun, 22 Feb 2015 15:25:54 -0800 Subject: [PATCH] minor cleanup --- tests/caveview/cave_render.c | 56 ++++++++++++++++++++++++++---------- 1 file changed, 41 insertions(+), 15 deletions(-) diff --git a/tests/caveview/cave_render.c b/tests/caveview/cave_render.c index 4d05cd1..a220c27 100644 --- a/tests/caveview/cave_render.c +++ b/tests/caveview/cave_render.c @@ -33,6 +33,7 @@ uint32 texture[TEX_SIZE][TEX_SIZE]; GLuint voxel_tex[2]; +// chunk state enum { STATE_invalid, @@ -79,10 +80,10 @@ void scale_texture(unsigned char *src, int x, int y, int w, int h) void build_base_texture(int n) { int x,y; - uint32 color = stb_rand() | 0xff808080; + uint32 color = stb_rand() | 0x808080; for (y=0; y MAX_MESH_WORKERS) @@ -606,6 +626,7 @@ void prepare_threads(void) } +// "better" buffer uploading #if 0 if (glBufferStorage) { glDeleteBuffersARB(1, &vb->vbuf); @@ -922,3 +943,8 @@ void render_caves(float campos[3]) // 18% converting from minecraft blocks to stb blocks // 9% reordering from minecraft axis order to stb axis order // 7% uploading vertex buffer to OpenGL + + + + +