[vtk-developers] Bug introduced in OpenGLContextDevice2D::DrawPoly
Eric E. Monson
emonson at cs.duke.edu
Fri Dec 31 16:13:26 EST 2010
Okay, I think I tracked it down. vtkPlotParallelCoordinates::Paint was not passing a real color array to the DrawPoly routine, only a single color value, so when you changed vtkOpenGLContextDevice2D::DrawPoly to use GL_COLOR_ARRAY the "color array" wasn't what it should have been.
I just pushed a change to gerrit which may fix the issue. Since it's just a little patch, feel free to re-implement it any way you want if the details of the way I've coded it aren't to your liking.
Well, I almost got out of 2010 with no local mods! :) Really, the only reason things have moved so far this year for me is because of your work with the Charts, in setting up the gerrit review process and your willingness to spend time helping me and incorporating changes that I need. I really appreciate all of your efforts.
Happy New Year!
On Dec 31, 2010, at 3:16 PM, Eric E. Monson wrote:
> As I think about it I wonder if the change you made to use GL_COLOR_ARRAY enabled instead of my implementation which used glColor4ubv with the vertex array to draw line strips in DrawPoly is just revealing a problem somewhere else (e.g. vtkPlotParallelCoordinates) rather than creating it...
> If one is drawing GL_LINE_STRIPs with GL_COLOR_ARRAY enabled, does the color array need to have one less entry than the vertex array (since there is one less line segment than there are vertices)?
> On Dec 31, 2010, at 1:08 PM, Eric E. Monson wrote:
>> Hey Marcus,
>> I'm getting closer to tracking down the problem I've been having with my parallel coordinates plots drawing some of the lines wrong when color-by-array is on: I think it's something that was introduced with commit 59f3d82d9183d7b3c5f014dfc7a3159562e0e494 when you "Split out the OpenGL 2 code from legacy OpenGL" and reworked some of the routines.
>> Attached are a Python test and two images, before and after that commit (16061efb087a07b22235d5cd1417b0cfe871218c used for "before"). It's like the color mapping has been shifted by a couple of indexes so that some parts of line segments are being drawn with the color that should be for later segments. (I know that's a bad description, but look at the images and see if you can see what I mean...)
>> I'll start taking a look at the code pretty soon, but I wanted to point it out in case an idea pops into your head right away.
>> Powered by www.kitware.com
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>> Follow this link to subscribe/unsubscribe:
> Powered by www.kitware.com
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> Follow this link to subscribe/unsubscribe:
More information about the vtk-developers