Vertices now carry general purpose 'data' rather than a 'material', though the data will be treated as a material in many cases. This is part of making the architecture more generic and involves some renaming.
This commit is contained in:
@ -91,13 +91,17 @@ 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);
|
||||
|
||||
//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);
|
||||
|
||||
//Pass the surface to the OpenGL window
|
||||
openGLWidget.addMesh(meshHighLOD, Vector3DInt32(30, 0, 0));
|
||||
openGLWidget.addMesh(meshLowLOD, Vector3DInt32(0, 0, 0), 63.0f / 31.0f);
|
||||
openGLWidget.addMesh(decodedMeshHighLOD, Vector3DInt32(30, 0, 0));
|
||||
openGLWidget.addMesh(decodedMeshLowLOD, Vector3DInt32(0, 0, 0), 63.0f / 31.0f);
|
||||
|
||||
openGLWidget.setViewableRegion(volData.getEnclosingRegion());
|
||||
|
||||
|
Reference in New Issue
Block a user