From ebb3b475d7acd46d95c11edcc0cbfd1f7dd2174e Mon Sep 17 00:00:00 2001 From: Jesus Fernandez Date: Wed, 1 Apr 2015 11:35:54 +0200 Subject: [PATCH] Build fix x, y, z members not found because stbvox_default_normals contains arrays not structs. --- stb_voxel_render.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stb_voxel_render.h b/stb_voxel_render.h index f2efc3e..8c63f6d 100644 --- a/stb_voxel_render.h +++ b/stb_voxel_render.h @@ -3164,7 +3164,7 @@ static char *find_best_normal(float x, float y, float z) int i; for (i=0; i < 32; ++i) { if (normal_names[i]) { - float dot = x * stbvox_default_normals[i].x + y * stbvox_default_normals[i].y + z * stbvox_default_normals[i].z; + float dot = x * stbvox_default_normals[i][0] + y * stbvox_default_normals[i][1] + z * stbvox_default_normals[i][2]; if (dot > best_dot) { best_dot = dot; best_slot = i;