diff --git a/engine/src/android/com/jme3/renderer/android/OGLESShaderRenderer.java b/engine/src/android/com/jme3/renderer/android/OGLESShaderRenderer.java index a38b6dfa4..10416c9e3 100644 --- a/engine/src/android/com/jme3/renderer/android/OGLESShaderRenderer.java +++ b/engine/src/android/com/jme3/renderer/android/OGLESShaderRenderer.java @@ -1260,11 +1260,11 @@ public class OGLESShaderRenderer implements Renderer { // can also add support for stencil here if (attachmentSlot == -100) { return GLES20.GL_DEPTH_ATTACHMENT; - } else if (attachmentSlot < 0 || attachmentSlot >= 16) { - throw new UnsupportedOperationException("Invalid FBO attachment slot: " + attachmentSlot); + } else if (attachmentSlot == 0) { + return GLES20.GL_COLOR_ATTACHMENT0; + } else { + throw new UnsupportedOperationException("Android does not support multiple color attachments to an FBO"); } - - return GLES20.GL_COLOR_ATTACHMENT0 + attachmentSlot; } public void updateRenderTexture(FrameBuffer fb, RenderBuffer rb) {