PDA

View Full Version : Weird streaks when rotating, but not all the time.



scumola
07-31-2002, 02:07 PM
Hello.

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:
http://badcheese.com/~steve/pics/vpg.jpg

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)

scumola
07-31-2002, 02:12 PM
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?

- Steve

cwc36
07-31-2002, 07:43 PM
That is maybee u draw the same things more than one time.. so it overlapped....
Make sure no overlap happen

secnuop
07-31-2002, 10:18 PM
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...

kevinhoque
08-01-2002, 01:06 AM
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.

Good luck
Kevin

scumola
08-02-2002, 08:58 AM
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).]

scumola
08-02-2002, 09:17 AM
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

kevinhoque
08-03-2002, 01:56 AM
You're welcome. :-)

[This message has been edited by kevinhoque (edited 08-03-2002).]