cocos2d/cocos2d-iphone — pull request #290 by colesbury (2013-02-21 19:14:53+00:00)
Title: Use glClear to clear the stencil buffer.

Use glClear instead of drawing a rectange so that current layer's mask
for the entire stencil buffer is cleared. This fixes clipping when
drawn to a texture larger than the screen size or when the stencil or
clipping node's children contain vertices with negative coordinates.

Fixes issue 1463 http://code.google.com/p/cocos2d-iphone/issues/detail?id=1463
(CCClippingNode does not clear the stencil buffer properly)

I've checked the clipping tests and they look ok.