Split 'decode()' function into several variants so it's not so heavily overloaded.
This commit is contained in:
@ -103,7 +103,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
// The surface extractor outputs the mesh in an efficient compressed format which is not directly suitable for rendering. The easiest approach is to
|
||||
// decode this on the CPU as shown below, though more advanced applications can upload the compressed mesh to the GPU and decompress in shader code.
|
||||
auto decodedMesh = decode(mesh);
|
||||
auto decodedMesh = decodeMesh(mesh);
|
||||
|
||||
//Pass the surface to the OpenGL window
|
||||
openGLWidget.addMesh(decodedMesh);
|
||||
|
@ -151,7 +151,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
// The surface extractor outputs the mesh in an efficient compressed format which is not directly suitable for rendering. The easiest approach is to
|
||||
// decode this on the CPU as shown below, though more advanced applications can upload the compressed mesh to the GPU and decompress in shader code.
|
||||
//auto decodedMesh = decode(mesh);
|
||||
//auto decodedMesh = decodeMesh(mesh);
|
||||
|
||||
//Pass the surface to the OpenGL window
|
||||
OpenGLMeshData meshData = buildOpenGLMeshData(mesh);
|
||||
|
@ -128,7 +128,7 @@ int main(int argc, char *argv[])
|
||||
auto mesh = extractMarchingCubesMesh(&volData, regToExtract);
|
||||
|
||||
// The returned mesh needs to be decoded to be appropriate for GPU rendering.
|
||||
auto decodedMesh = decode(mesh);
|
||||
auto decodedMesh = decodeMesh(mesh);
|
||||
|
||||
// Pass the surface to the OpenGL window. Note that we are also passing an offset in this multi-mesh example. This is because
|
||||
// the surface extractors return a mesh with 'local space' positions to reduce storage requirements and precision problems.
|
||||
|
@ -189,7 +189,7 @@ int main(int argc, char *argv[])
|
||||
auto mesh = extractCubicMesh(&volData, reg2);
|
||||
std::cout << "#vertices: " << mesh.getNoOfVertices() << std::endl;
|
||||
|
||||
auto decodedMesh = decode(mesh);
|
||||
auto decodedMesh = decodeMesh(mesh);
|
||||
|
||||
//Pass the surface to the OpenGL window
|
||||
openGLWidget.addMesh(decodedMesh);
|
||||
|
@ -92,12 +92,12 @@ int main(int argc, char *argv[])
|
||||
//Extract the surface
|
||||
auto meshLowLOD = extractMarchingCubesMesh(&volDataLowLOD, volDataLowLOD.getEnclosingRegion());
|
||||
// The returned mesh needs to be decoded to be appropriate for GPU rendering.
|
||||
auto decodedMeshLowLOD = decode(meshLowLOD);
|
||||
auto decodedMeshLowLOD = decodeMesh(meshLowLOD);
|
||||
|
||||
//Extract the surface
|
||||
auto meshHighLOD = extractMarchingCubesMesh(&volData, PolyVox::Region(Vector3DInt32(30, 0, 0), Vector3DInt32(63, 63, 63)));
|
||||
// The returned mesh needs to be decoded to be appropriate for GPU rendering.
|
||||
auto decodedMeshHighLOD = decode(meshHighLOD);
|
||||
auto decodedMeshHighLOD = decodeMesh(meshHighLOD);
|
||||
|
||||
//Pass the surface to the OpenGL window
|
||||
openGLWidget.addMesh(decodedMeshHighLOD, Vector3DInt32(30, 0, 0));
|
||||
|
Reference in New Issue
Block a user