From 089303f02f4a2e9eb829f532093fb7ce3d44f8a1 Mon Sep 17 00:00:00 2001 From: David Williams Date: Sun, 24 Aug 2014 23:05:29 +0200 Subject: [PATCH] Fix for example. --- examples/DecodeOnGPU/main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/DecodeOnGPU/main.cpp b/examples/DecodeOnGPU/main.cpp index 7f2d83c8..34c86bef 100644 --- a/examples/DecodeOnGPU/main.cpp +++ b/examples/DecodeOnGPU/main.cpp @@ -115,6 +115,9 @@ OpenGLMeshData buildOpenGLMeshData(const PolyVox::Mesh< PolyVox::MarchingCubesVe meshData.translation = QVector3D(translation.getX(), translation.getY(), translation.getZ()); meshData.scale = scale; + // Set 16 or 32-bit index buffer size. + meshData.indexType = sizeof(PolyVox::Mesh< PolyVox::MarchingCubesVertex< uint8_t > >::IndexType) == 2 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT; + return meshData; }