I have some code that I wrote that’s reading in some data and plotting it out. The problem is that when I rotate the object a bit, I can get streaks in the display, but it doesn’t happen all of the time. MOst of the time, the streaks aren’t there. I’ve got a picture of the streaks here:
Can someone tell me if there’s a known GL bug that’s causing this, or if I’m doing something wrong? I can post my code if necessary, but the dataset is a little large to post on a forum page. 8)
Oh yea - and the streaks are always either at a 90 or 45-degree angle. I’m using the nvidia driver under linux - could it be a driver bug?
That is maybee u draw the same things more than one time… so it overlapped…
Make sure no overlap happen
Just out of curiosity, what do your matrices look like at 90 degrees and 45 degrees? It seems kind of interesting that you only see the problem at these values. Is it possible that your matrices are singlar or something?
To rule out a driver bug you could try linking against the Mesa libs…
I’ve had a problem just like that a numbers of times. For me it has always been because the vertices towards the end of my array were not being initialised to correct values i.e. they were unitialised. So I thought (say) that I had 120 valid vertices when really I only had 109 and I was asking opengl to use all 120 - or alternatively, my index values were out of bounds (amounts to the same thing). Try dumping your vertex and index values to a text file and make sure that they are valid.
I’m just doing glQuads, not strips, but that shouldn’t matter, right? I’ll check my data to make sure that the “model” is right. I also re-compiled my code under cygwin on a windows machine and it showed the same bug, so I’m thinking that it’s not a driver issue. Still haven’t figured it out yet, How do I display my transformation matrices and what do I look for? I’m wondering why it only shows up sometimes if it’s a model (or data) flaw? I AM overlapping some glQuads, but I’m not drawing the same exact data over itself that I know of. I’m basicially drawing US terrain data that I’m getting out of a weather forecast model (I’ll add the weather part later), but I’m drawing the big US map, then I’m drawing a more refined close-up, and then yet aga, a close up.
Another weird bug, the streaks seem large and thick when the window is maximized, but when I size the window to a smaller size, the streaks become just lines, yet the lines tend to stay at 90 or 45 degrees (the lines are at 90 and 45 degrees, not when the model is rotated to 90 or 45 degrees).
[This message has been edited by scumola (edited 08-02-2002).]
Ok, got it, it was a data flaw. I found that some of my vertex data was a little off. 8)
x: 64, y: 68
vtx: 2.843815, -3.858742, 1.912843
vtx: 2.935604, -3.863731, 1.935403
vtx: 999999961690316245365415600208216064.000000, -999999961690316245365415600208216064.000000, -0.000000
vtx: 999999961690316245365415600208216064.000000, -999999961690316245365415600208216064.000000, -0.000001
[This message has been edited by kevinhoque (edited 08-03-2002).]