using the stencil buffer for collision?

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?


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.