I really could use some help with this one. I’ve searched through the “red book” from the link off of NeHe’s site. I’ve searched these forums for “clip” and “clipping” and read several, several articles to no avail. I’ve even tried enlarging my viewport like this:
glViewport(-16,-16,width+16,height+16); // pardon if the syntax is wrong but you get the idea
which had no effect whatsoever. It’s weird though. Some of the vertices, if they go just one pixel offscreen, the entire face disappears. Others go off fine with no effect. When they disappear it actually draws the face as if that vertex didn’t exist. Which of course makes all kind of “popping” effects as you rotate the scene.
Basically I’m rendering an array of GL_QUADS to do some height-mapped terrain. It works great. I started with simple colored quads with different colored vertices and moved on to texture mapped quads. With the colored quads the disappearing was very noticeable, as the faces actually changed colors due to the vanished vertex’s color no longer being used for face color calculation. I’ll try quad strips for some expected speedup later, but I’m really banging my head against a wall here with these disappearing faces!
I’m using gluPerspective for my frustum generation, with 45 as the angle, screenwidth/screenheight as the aspect, 0.1 for near, and 200 for far.
If anyone could tell me how to display stuff so it doesn’t seemingly arbitrarily wipe out my primitives I would be most appreciative!
Thanks in advance.