7
\$\begingroup\$

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?

\$\endgroup\$
3
  • \$\begingroup\$ 1. Probably; 2. Probably. Can't say much more without the application source. \$\endgroup\$ Commented Oct 13, 2015 at 10:11
  • \$\begingroup\$ You don't mention OpenGL version (modern or fixed-function), and if modern then whether or not you are using compatibility or core profile: these facts have bearing on the problem since it may well be a case of blend mode and/or how you've written your fragment shader source. Suggest you update your question & retag accordingly. And yes, it is likely your source that is the issue, even if the NVidia card is the only one acting up: you've probably written something in a way that is not conducive to uniform behaviour across different GPUs. \$\endgroup\$ Commented Oct 13, 2015 at 13:35
  • \$\begingroup\$ I am using VBOs to render the triangles. \$\endgroup\$ Commented Oct 13, 2015 at 13:39

1 Answer 1

8
\$\begingroup\$

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);
\$\endgroup\$
1
  • \$\begingroup\$ Wow, disabling polygon smoothing worked! Thanks a lot! :D \$\endgroup\$ Commented Oct 13, 2015 at 13:43

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.