View Full Version : How can I wipe off an already display triangle ?
09-10-2003, 07:10 PM
I draw a triangle,but when I draw a new triangle, it was covered by the old one.
I don't want to redraw the screen, just want to wipe off the old triangle or set it transparent. How can I do?
As soon as the triangle is drawn to screen its just a bunch of pixels so opengl have no information left about that triangles corners orh whats behind it. The solution is the one that you didnt want, clear and redraw everything except the triangle that you want to remove.
09-11-2003, 05:18 PM
I will try other methods to solve the problem!
09-11-2003, 07:53 PM
As Mazy already told you:
The only 'reasonable' way to get rid of an already drawn triangle is to redraw the hole scene without that triangle.
Why do people always try to reinvent the wheel?
it depends on your context, but you could also consider saving the buffer with the triangle not drawn, and copy it across and only redraw the triangle you want moved/deleted/transparent. This would be particularly beneficial if your scene is very expensive and you know a priori what triangle you want to move. Useful, for instance, when drawing a triangle sprite over a complicated scenes.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.