View Full Version : using the stencil buffer for collision?
02-08-2003, 09:14 AM
Is it possible to use the stencil buffer for collision? I know it is probably slow, but how would I do it? I already have the data in the stencil buffer, I just need to know how I check collision with it. My game is a 2D game with simple sphere collision. Should I read the stencil buffer into a temporary buffer or something?
02-08-2003, 02:54 PM
Hi, probably you draw the obstacles to stencil buffer and before moving the player and other entities you check if the stencil buffer is writen with the value specified when you draw the obstacles, if it is, then a collision was detected.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.