hey @paul.houx, I thought i’d post here as it’s relevant to this thread ( sort of ). I’m trying to run an example based on your geom shader but am running into an error I can’t diagnose.

```
void LineRenderer::update()
{
// brute-force method: recreate mesh if anything changed
if (!mVboMesh) {
if (mPoints.size() > 1) {
// create a new vector that can contain 3D vertices
std::vector<ci::vec3> vertices;
// to improve performance, make room for the vertices + 2 adjacency vertices
vertices.reserve(mPoints.size() + 2);
// first, add an adjacency vertex at the beginning
vertices.push_back(2.0f * ci::vec3(mPoints[0], 0) - ci::vec3(mPoints[1], 0));
// next, add all 2D points as 3D vertices
std::vector<ci::vec2>::iterator itr;
for (itr = mPoints.begin(); itr != mPoints.end(); ++itr)
vertices.push_back(ci::vec3(*itr, 0));
// next, add an adjacency vertex at the end
size_t n = mPoints.size();
vertices.push_back(2.0f * ci::vec3(mPoints[n - 1], 0) - ci::vec3(mPoints[n - 2], 0));
// now that we have a list of vertices, create the index buffer
n = vertices.size() - 2;
std::vector<uint16_t> indices;
indices.reserve(n * 4);
for (size_t i = 1; i < vertices.size() - 2; ++i) {
indices.push_back(i - 1);
indices.push_back(i);
indices.push_back(i + 1);
indices.push_back(i + 2);
}
// finally, create the mesh
ci::gl::VboMesh::Layout layout;
layout.attrib(ci::geom::POSITION, 3);
mVboMesh = ci::gl::VboMesh::create(vertices.size(), GL_LINES_ADJACENCY_EXT, { layout }, indices.size());
mVboMesh->bufferAttrib(ci::geom::POSITION, vertices.size() * sizeof(ci::vec3), vertices.data());
mVboMesh->bufferIndices(indices.size() * sizeof(uint16_t), indices.data());
}
else
mVboMesh.reset();
}
}
```

The error’s being thrown at mVboMesh = ci::gl::VboMesh::create() when the VBO is created…

Exception thrown: read access violation.

```
std::_Tree_comp_alloc<std::_Tmap_traits<unsigned int,std::vector<int,std::allocator<int> >,std::less<unsigned int>,std::allocator<std::pair<unsigned int const ,std::vector<int,std::allocator<int> > > >,0> >::_Myhead(...) returned 0x20.
If there is a handler for this exception, the program may be safely continued.
```

vertices and indices are both valid containers with size of 4 (at this stage). I’m running MSW10 with VS2015.

Any thoughts what the issue might be?

Thanks!