PDA

View Full Version : Triangles and Quads at the edge of the screen problem! (indeed :)



05-29-2005, 09:30 AM
OK.. thanks for even reading this :) .. As I have been programming on my heightmap application I have encountered a problem. It seams as though some of the triangles (have tried STRIP, QUAD and TRIANGLE) that are drawn particial on screen is drawn wrong. As I turn the camera the vertexes of the triangles moves up and down for no apparent reason.

So I figured it had to do with the initialization of the GL windown or viewport... ( but you'd be welcome to correct me :) )

But then! I tried the application on aonther computer and i worked just fine... I tested in on a third computer and i worked just fine as well. So my computer is the exeption, but still. There must be a programmming mistake here somewhere. All other OpenGL apllications (except my own which builds on the same principal as this application) works just fine on this computer. So what I'm saying is that my video should be able to override this problem somehow...

my computer is a laptop so it has got this mumbojumbo intel graphic mobile accelerator...

Thanks in advance.. (Please, do give me hell for my terrible english :D )

Ehsan Kamrani
05-29-2005, 10:57 AM
One of the reasons is that you don't define the view volum correctly.When you are in the prspective mode, you shouldn't specify a small value for the near plan.(as an example 0.001 ).But maybe this problem doesn't refer to the view volume.
-Ehsan-

05-29-2005, 11:06 AM
Thanks but, Nah... that didn't help. I even sat it up to 5; which is the distance to the nearest object.

05-30-2005, 05:56 AM
Jeeepppzzz... Been bout 24 hours now... problem still lingers on. This is mighty enoying for my cause.

If this is any help I've figured that the ting causing this major disfunction is my videocard's built in clipping thingy. SO.. in other words, I'll have to disable the hardware feature somehow. Anyone here know how to disable/override built in hardware functions like this cliping thing?

Peace to all!

carl_lewis
05-30-2005, 06:20 AM
the way to disable the fixed function clipper is to use the shading language to implement user controlled clip planes in a vertex program... and you need a proper graphics card for that!

something like a geforce fx/6 series or ati 9700 would be best

05-30-2005, 08:32 AM
So in other words I've gotta accept the loss and face that my graphics card can't draw near the screen edge? Kinda hard to swallow :( ...

well well.. any ways, thanks for all help!

dorbie
05-30-2005, 12:46 PM
This might be due to the numbers you use. Do you have a large eye translation to position over the terrain? This causes precision issues that can vary with the OpenGL implementation you're using.

The solution is to keep the eye translation low and calculate a relative translate for the terrain in double precision in software before loading that to the modelview matrix.