Tuesday, September 20, 2016

rendering - Why do I see spaces between polygons in OpenGL, only on an Nvidia 720M?


I'm developing an OpenGL application that renders .obj 3D models. I use VBOs to render the polygons. Using the same code, the loaded models appear fine on all PCs, except on my Nvidia 720M.


My laptop sports an Intel HD 4000 embedded graphics GPU, and an Nvidia 720M. When I use the Intel GPU, it looks fine, but when I load it on the Nvidia 720M, spaces appear around polygons like so:


On Nvidia 720M GPU:


3D-rendered car, with gaps around polygons


On everything else:


3D-rendered car, with gaps around polygons


No other 3D application that runs on the Nvidia 720M GPU has the same issue. I am using the latest drivers.


Is this a problem with my application? How can I fix it?




Answer



Just a hunch... is your GPU somehow doing polygon antialiasing? That would cause such artifacts. For example, if two neighbouring polygons each cover a particular pixel for 50%, the total coverage (alpha) for that pixel would be 75%, not 100%.


Try forcing the option off:


glDisable(GL_POLYGON_SMOOTH);

Or even:


glHint(GL_POLYGON_SMOOTH_HINT, GL_FASTEST);

No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...