Commit 254f1e37 authored by Ken Martin's avatar Ken Martin Committed by Kitware Robot

Merge topic 'glyph_error'

19d616bc Fix an error with depth peeeling and glyph rep
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Reviewed-by: default avatarDavid Lonie <david.lonie@kitware.com>
Merge-request: !2123
parents 0d3d2378 19d616bc
......@@ -554,16 +554,18 @@ void vtkOpenGLGlyph3DHelper::GlyphRenderInstances(
this->NormalMatrixBuffer->Release();
}
this->ColorBuffer->Bind();
this->ColorBuffer->Upload(colors, vtkOpenGLBufferObject::ArrayBuffer);
if (!this->Primitives[PrimitiveTris].VAO->AddAttributeArrayWithDivisor(
this->Primitives[PrimitiveTris].Program, this->ColorBuffer,
"glyphColor", 0, 4*sizeof(unsigned char), VTK_UNSIGNED_CHAR, 4, true, 1, false))
if (this->Primitives[PrimitiveTris].Program->IsAttributeUsed("glyphColor"))
{
vtkErrorMacro(<< "Error setting 'diffuse color' in shader VAO.");
this->ColorBuffer->Bind();
this->ColorBuffer->Upload(colors, vtkOpenGLBufferObject::ArrayBuffer);
if (!this->Primitives[PrimitiveTris].VAO->AddAttributeArrayWithDivisor(
this->Primitives[PrimitiveTris].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