View Full Version : Diagonals showing up in Quads?
10-15-2000, 11:26 PM
I have been working on one of my 3-d visualization programs where I am using quads to create an architectural scene. Out of the blue(it seems) I run my code and all of the quads seem to be showing black outlines (and diagonals from their respective triangles). Not only do these unwanted diagonals show up, but it seems as if there is no hardware acceleration and is very slow. I am mostly puzzeled by the fact that when I restart the computer the code will run fine for a while (3-5 executes) then it will revert back to the above state. I tryed running the code on another machine and had the same problem (this time there wasn't a fix after restarting).
Any help on this would be great.
10-16-2000, 01:53 AM
It could be that you're not freeing up the graphics card memory as you draw, so your graphics card runs out of VRAM and your computer defaults to using software rendering. The diagonals could then be caused by pants software drivers.
10-16-2000, 10:32 AM
Do you have suggestions on how to free up the memory?
You can get this problem when the rendering contexts aren't freed properly, happens all the time to me when my programs (frequently http://www.opengl.org/discussion_boards/ubb/smile.gif ) crash.
[This message has been edited by BK (edited 10-16-2000).]
10-16-2000, 10:39 PM
I'm not sure why I would have the problem then the first time I run the program right after a restart?
10-17-2000, 12:47 AM
Yea.. Assuming you are using textures, try delete textures if you're not using them.. glDeleteTexture or something. To find out if its really a texture mem problem, dont load any texture at all and see if the problem occurs on plain solid colored quads too..
I've seen the diagonals in MS Software OpenGL. (When 32 bit rendering was used)
10-17-2000, 01:13 AM
Just an idea coming from the thread on tesselation problems: Could also be polygon antialiasing. Make sure you never enable polygon smoothing and remove polygon smooth hints, or try setting them to FASTEST or DONT_CARE.
I have seen those diagonals in 16 bit, too. I can provoke an fallback to software rendering in 32 bit by sizing the rendering window as large as ther is not enough video memory left (16MB TNT). The other case, where I get software rendering is a WinAMP plug-in (.dll). I think I free up all memory, but when I restart my plugin I get just software rendering. A restart of WinAMP fixes the problem (WinNT, Detonator 3 drivers, strange to say there is no problem with the Win98 version of the Detonator 3 drivers ).
I'm not sure why a restart doesn't fix it on the other machine, was it a hard reset? (i.e. turn power off for 10 seconds) or soft reset? sounds unlikely, but it may be possible that the hardware doesn't get reset when the OpenGL driver starts on that particular machine.
Also, for a while I had overlooked the fact that I forgot to delete the rendering context on exit, and so every 5-6 runs it would go in software mode. I found that running Quake 3 (I guess any decent openGL implemntation would do) and exiting got hardware rendering back, and clued me in that I had stupidly forgot the cleanup. I know you probably don't want to ship Quake 3 as part of your distribution, and make it part of your shutdown procedure but if doing that fixes it it might tell you that something is astray in the cleanup part of your app.
I would guess the black bits are just software rendering artifacts.
10-17-2000, 08:42 AM
Ahhh, Polygon smoothing...I think that may have been tripping me up. I had turned that on to see if it made a difference and forgot to turn it off. Is that function not supported by some hardware which would force a software render? It seems to be working smoothly now though. Unfortunatly I am far from the other computer I tested on before that caused the problem so I can't see if it fixed it there. It works great here though. Thanks guys.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.