diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-11-17 03:30:59 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-11-17 03:31:33 +0300 |
commit | 4095835db11ea10c279187c741a769adf5d4ef4c (patch) | |
tree | aa49c7bbb4b313f632e3dc28d55ed3b9c9db6c2a | |
parent | 82b8c156841f7202a4ca806968a782e517201d81 (diff) |
Cycles: Fix compilation error and warning without OPENVDB
-rw-r--r-- | intern/cycles/render/volume.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/intern/cycles/render/volume.cpp b/intern/cycles/render/volume.cpp index ebb9752756e..ac4154ac4df 100644 --- a/intern/cycles/render/volume.cpp +++ b/intern/cycles/render/volume.cpp @@ -76,6 +76,7 @@ enum { QUAD_Z_MAX = 5, }; +#ifdef WITH_OPENVDB const int quads_indices[6][4] = { /* QUAD_X_MIN */ {4, 0, 3, 7}, @@ -140,6 +141,7 @@ static void create_quad(int3 corners[8], quads.push_back(quad); } +#endif /* Create a mesh from a volume. * @@ -284,6 +286,7 @@ void VolumeMeshBuilder::create_mesh(vector<float3> &vertices, vector<float3> &face_normals, const float face_overlap_avoidance) { +#ifdef WITH_OPENVDB /* We create vertices in index space (is), and only convert them to object * space when done. */ vector<int3> vertices_is; @@ -298,6 +301,12 @@ void VolumeMeshBuilder::create_mesh(vector<float3> &vertices, convert_object_space(vertices_is, vertices, face_overlap_avoidance); convert_quads_to_tris(quads, indices, face_normals); +#else + (void)vertices; + (void)indices; + (void)face_normals; + (void)face_overlap_avoidance; +#endif } void VolumeMeshBuilder::generate_vertices_and_quads(vector<ccl::int3> &vertices_is, |