我正在尝试将深度和模板缓冲区附加到帧缓冲区。我这样做如下:
int[] bufferHandle = new int[1];
GLES31.glGenRenderbuffers(1, bufferHandle, 0); // glError = 0 (GL_NO_ERROR)
GLES31.glRenderbufferStorage(GLES31.GL_RENDERBUFFER, GLES31.GL_DEPTH24_STENCIL8, width, height); // glError = 1282 (GL_INVALID_OPERATION)
GLES31.glBindRenderbuffer(GLES31.GL_RENDERBUFFER, 0); // // glError = 0 (GL_NO_ERROR)
GLES31.glFramebufferRenderbuffer(GLES31.GL_FRAMEBUFFER, GLES31.GL_DEPTH_STENCIL_ATTACHMENT, GLES31.GL_RENDERBUFFER, bufferHandle); // glError = 1282 (GL_INVALID_OPERATION)
和调用返回 1282 (GL_INVALID_OPERATION) glRenderbufferStorage
。glFramebufferRenderbuffer
有什么想法我可能会错过吗?