View Full Version : How to remove pixel from the framebuffer?
I want to draw a square and then dig a smaller rectangle hole in it. Is it possible to clear some pixels from the framebuffer for this purpose? Thank you very much!
I know that I can do this by only drawing the parts except the hole. But I am wondering whether it is possible to draw something in the framebuffer and then remove pixels from it? Thank you very much!
I have used the stencil buffer to do this but found that stencil buffer seems not work in Firefox and only Chrome. Does anyone have similar problem? Thank you!
02-13-2012, 02:54 PM
Have you drawn something into the framebuffer before? If yes, you can render your square into an extra texture (renderbuffer object) and blend that over the framebuffer. For making a hole you can set the alpha value in this texture to zero.
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.