Commit 2fd1d443 authored by Chuck Atkins's avatar Chuck Atkins

Merge branch 'glyph_error' into release

* glyph_error:
  add fix from master to release tag
parents 579a33d4 c8ac8342
......@@ -553,16 +553,18 @@ void vtkOpenGLGlyph3DHelper::GlyphRenderInstances(
this->NormalMatrixBuffer->Release();
}
this->ColorBuffer->Bind();
this->ColorBuffer->Upload(colors, vtkOpenGLBufferObject::ArrayBuffer);
if (!this->Tris.VAO->AddAttributeArrayWithDivisor(
this->Tris.Program, this->ColorBuffer,
"glyphColor", 0, 4*sizeof(unsigned char), VTK_UNSIGNED_CHAR, 4, true, 1, false))
if (this->Tris.Program->IsAttributeUsed("glyphColor"))
{
vtkErrorMacro(<< "Error setting 'diffuse color' in shader VAO.");
this->ColorBuffer->Bind();
this->ColorBuffer->Upload(colors, vtkOpenGLBufferObject::ArrayBuffer);
if (!this->Tris.VAO->AddAttributeArrayWithDivisor(
this->Tris.Program, this->ColorBuffer,
"glyphColor", 0, 4*sizeof(unsigned char), VTK_UNSIGNED_CHAR, 4, true, 1, false))
{
vtkErrorMacro(<< "Error setting 'diffuse color' in shader VAO.");
}
this->ColorBuffer->Release();
}
this->ColorBuffer->Release();
this->InstanceBuffersLoadTime.Modified();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment