Hi, Guys,
Bug reported to NVidia. Will keep you posted on progress. See my report
below:
WL
From: Wojciech Lewandowski
Sent: Saturday, October 15, 2011 2:10 PM
To: devsupp...@nvidia.com
Subject: OpenGL VBO bug in Windows (OpenSceneGraph)
Dear Dev Support,
We have recently isolated an issue with Vertex Buffer Objects in
OpenSceneGraph on Windows 7 platform. Issue seems to happen on variety of
boards and drivers. We actually saw it on everything we tested on. GF580,
GF460, GF540, GF 280 with recent drivers from 270.xx to most current 285.xx.
And people on osg forums also reported seeing it on several Quadros (don’t
remember which ones, though) with older 186.xx drivers. We did not see it
on other manufacturer boards and we did not see it on NVidia in Linux. It
can be “fixed” by turning off Threading optimization in NVidia control
panel. So its most probably an issue in NVidia OpenGL Windows drivers.
The problem we observe is corruption of the texture coords stored in VBOs in
one or more primitive sets when sufficiently large VBOs are used. It happens
when VBO sizes are close to range limits addressable with 16 bit ushort and
greater (we use Uint 32 bit indices, though). These large VBOs contain
vertices and texcoords. These triangles are indexed and drawn with
glDrawElements call. 32 bit Uint indices are used and also stored in buffer
objects. It seems that issue is somehow triggered by small addition of
legacy code. All these triangles use single overall normal (I am not sure
but this probably translates to glNormal call). If this overall normal is
not added output seems correct.
I have attached modifed osgViewer applet showing the issue. Package contains
both prebuilt binary with neccessary osg dlls and modified osgViewer source
if you prefer to use your OSG version. osgViewer should be run without
command line arguments to show the problem.
Sample code in osgViewer replicating the issue was created in process of
elimination of various factors so its now rather artificial. It just draws
two primitive sets: one triangle and second primitve made of grid build from
many triangles. Problem directly affects this grid of triangles. First
triangle is somehow involved and neccessary to make it happen, though. If
there is no first triangle and there is no overall normal problem does not
appear.
Visually the code just draws one triangle and quad over the triangle. Both
quad and triangle are colored with red yellow magenta gradient. If all is
ok - its hard to notice the border between quad and triangle. If the problem
shows up - quad is either drawn in red or not drawn at all, so only a
triangle is drawn with gradient and nasty z-fighting between red quad and
triangle can be observed.
See attached screenshots for correct and incorrect output. I will be
grateful for some feedback on this issue. Let me know if you are going to
fix it and in what drivers ?
Best Regards,
Wojtek Lewandowski
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org