Revision 586b5fa1
Added by Leszek Koltunski almost 6 years ago
src/main/java/org/distorted/library/main/DistortedFramebuffer.java | ||
---|---|---|
276 | 276 |
*/ |
277 | 277 |
public boolean setAsInput(int texture) |
278 | 278 |
{ |
279 |
if( texture>=0 && texture<mNumColors && mColorH[texture]>0 ) |
|
279 |
if( texture>=0 && texture<mNumFBOs*mNumColors && mColorH[texture]>0 )
|
|
280 | 280 |
{ |
281 | 281 |
GLES31.glActiveTexture(GLES31.GL_TEXTURE0); |
282 | 282 |
GLES31.glBindTexture(GLES31.GL_TEXTURE_2D, mColorH[texture]); |
... | ... | |
290 | 290 |
|
291 | 291 |
public void bindForOutput(int texture) |
292 | 292 |
{ |
293 |
if( texture>=0 && texture<mNumColors && mColorH[texture]>0 ) |
|
293 |
if( texture>=0 && texture<mNumFBOs*mNumColors && mColorH[texture]>0 )
|
|
294 | 294 |
{ |
295 | 295 |
GLES31.glFramebufferTexture2D(GLES31.GL_FRAMEBUFFER, GLES31.GL_COLOR_ATTACHMENT0, GLES31.GL_TEXTURE_2D, mColorH[texture], 0); |
296 | 296 |
} |
Also available in: Unified diff
Port another commit from master.
I spoke too soon, the ARM Mali flashing is of course not fixed yet. The previous commit fixed Triblur, but the bug is still reproducible elsewhere (only in the 'postprocessed' apps though).
This commit introduces a circular queue in case of the postprocessing FBOs - with little success though.