* Throw UnsupportedOperationException if multiple FBO color attachments are used on Android (only a single attachment, GL_COLOR_ATTACHMENT0, is supported)

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10526 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
sha..RD 12 years ago
parent 27bf244729
commit cb0a2ed1cd
  1. 8
      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) {

Loading…
Cancel
Save