[vtk-developers] Rendering of vtkPolyData broken on Nvidia systems

Marcus D. Hanwell marcus.hanwell at kitware.com
Mon Jun 25 17:04:54 EDT 2012


On Fri, Jun 22, 2012 at 11:58 AM, Oleg Koren <koren at curefab.com> wrote:
> Hello,
>
> I think, now I know the root of the problem. Great thanks for the suggestion
> to run an OpenGL logger. My log boils down to the following:
>
> glColor3f(1.0f, 0.0f, 0.0f);
> glDeleteLists(1,1);
> glGenLists(1);
> glNewList(1,GL_COMPILE);
> glDisable(GL_LIGHTING);
> glBegin(GL_LINE_STRIP);
>        glVertex3f(0.000000,0.000000,0.000000);
>        glVertex3f(1.000000,0.000000,0.000000);
>        glVertex3f(1.000000,1.000000,0.000000);
>        glVertex3f(0.000000,1.000000,0.000000);
>        glVertex3f(0.000000,0.000000,0.000000);
> glEnd();
> glEnable(GL_LIGHTING);
> glEndList();
> glCallList(1);
>
> glColor3f(1.0f, 1.0f, 0.0f);
> glDeleteLists(2,1);
> glGenLists(1);
> glNewList(2,GL_COMPILE);
> glDisable(GL_LIGHTING);
> glBegin(GL_LINE_STRIP);
>        glVertex3f(0.000000,0.000000,0.000000);
>        glVertex3f(0.000000,1.000000,0.000000);
>        glVertex3f(0.000000,1.000000,1.000000);
>        glVertex3f(0.000000,0.000000,1.000000);
>        glVertex3f(0.000000,0.000000,0.000000);
> glEnd();
> glEnable(GL_LIGHTING);
> glEndList();
> glCallList(2);
>
> and this actually doesn't work. Which is, I guess, because lists are
> deprecated since OpenGL 3.0 and should receive very limited support by now,
> if any. Removing all calls to list functions does the trick.
>
> That means, one should always set ImmediateModeRenderingOn on a
> vtkPolyDataMapper. Immediate rendering mode disables OpenGL lists.
>
Hi Oleg,

I have started looking into this issue. The code you gave didn't match
the images, or the GL log trace you supplied. Pushing the second set
of lines into z rather than x produced a matching image with the same
coordinates as in the log.

I am not able to reproduce you issue here using nVidia binary driver
302.17 using a Linux 3.4.4 kernel, and an nVidia Quadro 600 card. As
you did not use SetInputData I guess you are using VTK 5.10 or below,
I don't think that rendering code has changed very much at all in the
last few releases and so it is unlikely to affect but it would be good
to know your VTK version.

We could add this as a test case, and I have some other GPUs/driver
versions I can try this on. Immediate mode and display lists render
the same here. Unless you are doing something unusual you should be
getting a class OpenGL context, not an OpenGL 3+ context.

Seeing the output of LoadOpenGLExtension may be helpful, using ctest
-R LoadOpenGLExtension -V should be enough to run that from a VTK
build directory.

Thanks,

Marcus



More information about the vtk-developers mailing list