Rendering indexed mesh with openGl from Cuda

Greetings,

I am still new to Cuda and was curious if there was reading (or advice) on the topic of rendering an indexed mesh built on Cuda kernels via OpenGL. Right now I have a sparse voxel hash volume; Niessner’s to be precise, where I use Cuda to run the marching cubes algorithm for reconstruction; and it correctly triangulates in an average of 50ms per frame with about 2 million vertices in the end. The reading on Cuda I have found available always takes the example of calculating some math function and fills it into a Pixel Buffer Object which makes sense to me, but meshes are a different story. I am hoping for an overview description of the standard pieces involved?

The way I understand how to render meshes with OpenGl without Cuda would be binding a uv, color, index, and position buffers to openGl; each on their own buffer and then passing the stride, offsets, and values. Perhaps even binding a shader program for use. Ultimately the end result is calling glDrawElements(indexedTriangleList). However, since cuda kernels build my mesh, the gain in performance would be lost to ask the device for these arrays just to immediately pass right back to openGl, so how would one go about connecting these two pieces of the gpu libraries together?

The data struct on device…

HashVolData
{
    thrust::device_vector<core::float3>* VertexArray;
    thrust::device_vector<core::float3>* NormalArray;
    thrust::device_vector<core::uchar3>* ColorArray;
    thrust::device_vector<unsigned int>* IndexArray;
}

I noticed that gvdb library is out and I will take a deeper dive, but from at a glance reading, it is ambiguous if my representation of the field is compatible with the gvdb_volume* classes; In particular in how to transform how memory is laid out to the OpenGVD format that it expects.

I save this mesh to disk as follows:

thrust::host_vector<core::float3> vertexArr = *VertexArray;
       thrust::host_vector<core::float3> normalArr = *NormalArray;
       thrust::host_vector<core::uchar3> colorArr = *ColorArray;
       thrust::host_vector<unsigned int> indexArr = *IndexArray;

       //open file 
       unsigned int triangleCount = indexArr.size()/3;

       for(size_t i = 0; i < totalVertexCount; ++i)
       {
           //write vertexArray[i] && ColorArray[i] to file
       }

       for(size_t i = 0; i < totalVertexCount; ++i)
       {
          //write normalArray[i + 0..2] to file
       }

       for(size_t i = 0; i < triangleCount; ++i)
       {
          //write indexArray[i*3 + 0..2]+1 to file if unique
       }
       //close file