[vtk-developers] Bug introduced in OpenGLContextDevice2D::DrawPoly

Eric E. Monson emonson at cs.duke.edu
Fri Dec 31 15:16:43 EST 2010


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)?

-Eric

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.
> 
> Thanks,
> -Eric
> 
> <test_pcoords_cats.py>
> <Before.png>
> <After.png>_______________________________________________
> 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:
> http://www.vtk.org/mailman/listinfo/vtk-developers
> 




More information about the vtk-developers mailing list