Revision 270c27bc
Added by Leszek Koltunski almost 7 years ago
src/main/java/org/distorted/library/DistortedNode.java | ||
---|---|---|
257 | 257 |
if( mParent!=null ) mParent.adjustIsomorphism(); |
258 | 258 |
} |
259 | 259 |
|
260 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
261 |
|
|
262 |
int markStencilAndDraw(long currTime, DistortedOutputSurface surface, float marginInPixels) |
|
263 |
{ |
|
264 |
DistortedInputSurface input = mNumChildren[0]==0 ? mSurface : mData.mFBO; |
|
265 |
|
|
266 |
if( input.setAsInput() ) |
|
267 |
{ |
|
268 |
// Mark area of our object + marginInPixels pixels around with 1s in Stencil buffer |
|
269 |
DistortedRenderState.setUpStencilMark(); |
|
270 |
mEffects.drawPriv(mSurface.getWidth()/2.0f, mSurface.getHeight()/2.0f, mMesh, surface, currTime, marginInPixels); |
|
271 |
|
|
272 |
// Actually draw our object. |
|
273 |
mState.apply(); |
|
274 |
mEffects.drawPriv(mSurface.getWidth()/2.0f, mSurface.getHeight()/2.0f, mMesh, surface, currTime, 0); |
|
275 |
return 1; |
|
276 |
} |
|
277 |
return 0; |
|
278 |
} |
|
279 |
|
|
260 | 280 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
261 | 281 |
// return the total number of render calls issued |
262 | 282 |
|
... | ... | |
267 | 287 |
if( input.setAsInput() ) |
268 | 288 |
{ |
269 | 289 |
mState.apply(); |
270 |
mEffects.drawPriv(mSurface.getWidth()/2.0f, mSurface.getHeight()/2.0f, mMesh, surface, currTime); |
|
290 |
mEffects.drawPriv(mSurface.getWidth()/2.0f, mSurface.getHeight()/2.0f, mMesh, surface, currTime, 0);
|
|
271 | 291 |
return 1; |
272 | 292 |
} |
273 | 293 |
|
Also available in: Unified diff
Progress with Stencils in postprocessing.