Revision fc695380
Added by Leszek Koltunski almost 8 years ago
src/main/java/org/distorted/examples/fbo/FBORenderer.java | ||
---|---|---|
71 | 71 |
{ |
72 | 72 |
if( mRoot!=null ) |
73 | 73 |
{ |
74 |
if( depth ) mRoot.glEnable (GLES30.GL_DEPTH_TEST); |
|
75 |
else mRoot.glDisable(GLES30.GL_DEPTH_TEST); |
|
76 |
|
|
77 |
mRoot.glDepthMask(depth); |
|
78 |
|
|
79 |
// we can also, to save memory, delete/recreate |
|
80 |
// the depth buffer each time. This is optional. |
|
74 | 81 |
DistortedFramebuffer fbo = mRoot.getFramebuffer(); |
75 | 82 |
fbo.enableDepth(depth); |
76 | 83 |
} |
src/main/java/org/distorted/examples/starwars/StarWarsRenderer.java | ||
---|---|---|
138 | 138 |
|
139 | 139 |
mScreen = new DistortedScreen(); |
140 | 140 |
mScreen.setProjection(60.0f, 0.0f, 0.0f); |
141 |
mScreen.enableDepth(false); |
|
142 | 141 |
} |
143 | 142 |
|
144 | 143 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
425 | 424 |
|
426 | 425 |
mBackground = mScreen.attach(mCrawlBackgroundTexture, mCrawlBackgroundEffects,mQuad); |
427 | 426 |
mBackground.attach(mCrawlTexture, mCrawlEffects,mQuad); |
427 |
mBackground.glDisable(GLES30.GL_DEPTH_TEST); |
|
428 |
mBackground.glDepthMask(false); |
|
428 | 429 |
mCrawlEffects.registerForMessages(this); |
429 | 430 |
} |
430 | 431 |
else if( objectID==crawlID ) |
Also available in: Unified diff
Make it possible to render each DistortedNode with adjustable OpeGL state (writeing to Color, Depth,Stencil buffers, DEPTH, STENCIL, BLENDING on.off, etc)