Failed to make complete framebuffer object 8cd6 (iOS, programmatically created OpenGL view)

I've been having a problem getting my programmatically created OpenGL view to work on certain iOS versions/devices. It seem to be most common on Jailbroken devices, but does also happen on normal devices. It appears to only be v4.1 or 4.2.1 that it fails on.

The device I have is jailbroken (it's not mine and certainly not my choice to jailbreak it!) and has v4.1 (8B117) of iOS on it.

The error is 8cd6, which means that it failed to attach the framebuffer (or something along those lines).

I've searched and searched, but none of the other solutions I've found have helped. Most of them are using a depth buffer too, but mine is purely 2D and has no depth buffer.

Here's how I create the buffers:

glGenFramebuffersOES(1, &defaultFramebuffer);
glBindFramebufferOES(GL_FRAMEBUFFER_OES, defaultFramebuffer);

glGenRenderbuffersOES(1, &colorRenderbuffer);
glBindRenderbufferOES(GL_RENDERBUFFER_OES, colorRenderbuffer);

glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_RENDERBUFFER_OES, colorRenderbuffer);

Other setup values:

glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrthof(0, rect.size.width, 0, rect.size.height, -1, 1);
glMatrixMode(GL_MODELVIEW);
glViewport(0, 0, rect.size.width, rect.size.height);

glDisable(GL_DEPTH_TEST);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_BLEND_SRC);
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);

int* mts = calloc(1, sizeof(int));
glGetIntegerv(GL_MAX_TEXTURE_SIZE, mts);

resizeFromLayer:

-(BOOL) resizeFromLayer: (CAEAGLLayer*) _layer
{
    // Allocate color buffer backing based on the current layer size
    glBindRenderbufferOES(GL_RENDERBUFFER_OES, colorRenderbuffer);

    NSLog(@"Layer Bounds: %f x %f", _layer.bounds.size.width, _layer.bounds.size.height);
    NSLog(@"Layer Position: %f x %f", _layer.bounds.origin.x, _layer.bounds.origin.y);
    if(![context renderbufferStorage:GL_RENDERBUFFER_OES fromDrawable: _layer])
    {
        NSLog(@"renderBufferStorage failed!");
    }

    glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_WIDTH_OES, &backingWidth);
    glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_HEIGHT_OES, &backingHeight);
    NSLog(@"Backing: %d x %d", backingWidth, backingHeight);

    if (glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES) != GL_FRAMEBUFFER_COMPLETE_OES)
    {
        NSLog(@"Failed to make complete framebuffer object %x", glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES));
        return NO;
    }

    return YES;
}

It's the line "Failed to make complete framebuffer object" that gets called with the error code 8cd6.

I have it sorted thanks to the two users above, who helped me realise something.

I moved the creation of the buffers out of the init function of the class and created two new functions:

-(void) destroyFrameBuffer
{
    // Tear down GL
    if (defaultFramebuffer)
    {
        glDeleteFramebuffersOES(1, &defaultFramebuffer);
        defaultFramebuffer = 0;
    }

    if (colorRenderbuffer)
    {
        glDeleteRenderbuffersOES(1, &colorRenderbuffer);
        colorRenderbuffer = 0;
    }
}

-(void) createFrameBuffer
{
    // Create default framebuffer object. The backing will be allocated for the current layer in -resizeFromLayer
    glGenFramebuffersOES(1, &defaultFramebuffer);
    glBindFramebufferOES(GL_FRAMEBUFFER_OES, defaultFramebuffer);

    glGenRenderbuffersOES(1, &colorRenderbuffer);
    glBindRenderbufferOES(GL_RENDERBUFFER_OES, colorRenderbuffer);

    glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_RENDERBUFFER_OES, colorRenderbuffer);
}

I then added calls to these at the beginning of the resizeFromLayer function:

[self destroyFrameBuffer];
[self createFrameBuffer];

ūü߆ ‚Äć Failed to create full framebuffer 8cd6 object (iOS , I've been having a problem getting my programmatically created OpenGL view to work on certain iOS versions/devices. It seem to be most¬† Searching for this problem only gave me posts that were regarding opengl stuff that I have no knowledge of whatsoever. On my Storyboard, I've got 1 view in wich I put another slightly smaller UIView

I've just had the same problem on a project I'm working on

The error printed is:

Failed to bind EAGLDrawable: to GL_RENDERBUFFER 1

Failed to make complete framebuffer object 8cd6

To fix this I had to make sure I only mark the view for redraw while its self.window is not nil.

I am using a GLKView with my own CADisplayLink

Failed to make complete framebuffer object |Apple Developer Forums, Failed to create full framebuffer 8cd6 object (iOS, programmatically created To fix this, I had to make sure that only the view for redrawing was checked, while its a lot of time, I found a solution for this "Failed to create a full framebuffer object. the opengl methods that make masking possible, I add a sprite in the view,  Failed to make complete framebuffer object 8cd6 (iOS, programmatically created OpenGL view)

I am using Cocos2d v2.x I used the above solution to create my solution, that solved my simliar issue:

 -(void) destroyFrameBuffer
 {
   // Tear down GL
    if (_defaultFramebuffer)
    {
       glDeleteFramebuffers(1, &_defaultFramebuffer);
       _defaultFramebuffer = 0;
    }

    if (_colorRenderbuffer)
    {
       glDeleteRenderbuffers(1, &_colorRenderbuffer);
       _colorRenderbuffer = 0;
    }


 }

 -(void) createFrameBuffer
 {
    // Create default framebuffer object. The backing will be allocated for the current layer in -resizeFromLayer
    glGenFramebuffers(1, &_defaultFramebuffer);
    NSAssert( _defaultFramebuffer, @"Can't create default frame buffer");

    glGenRenderbuffers(1, &_colorRenderbuffer);
    NSAssert( _colorRenderbuffer, @"Can't create default render buffer");

    glBindFramebuffer(GL_FRAMEBUFFER, _defaultFramebuffer);
    glBindRenderbuffer(GL_RENDERBUFFER, _colorRenderbuffer);
    glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, _colorRenderbuffer);

}

- (BOOL)resizeFromLayer:(CAEAGLLayer *)layer
{

    [self destroyFrameBuffer];
    [self createFrameBuffer];
    etc.....

Failed to make complete framebuffer · Issue #4065 · mapbox , and that call fails (returns NO). At that point the render buffer is incomplete and display of the view stops working. If, you do anything to cause  2015-10-23 17:16:26.812 test4[1640:952055] Failed to bind EAGLDrawable: <CAEAGLLayer: 0x14ee08f40> to GL_RENDERBUFFER 1. 2015-10-23 17:16:26.812 test4[1640:952055] Failed to make complete framebuffer object 8cd6 However the app then seems to recover from this problem somehow.

After spending a lot of time i found solution for this "Failed to make complete framebuffer object" i am using using masking on CCSprite, but before to initialize opengl methods that make masking possible i am adding sprite in a view, before adding you have to add a scheduler of 1 second and in that scheduler add your ccsprite in a view.

Cheers!

iphone UITextView does not support data detectors when the text , Failed to make complete framebuffer object 8cd6 (iOS, programmatically created OpenGL view). I've been having a problem getting my programmatically  The perfect emulation setup to study and develop the Linux kernel v5.1, kernel modules, QEMU, gem5 and x86_64, ARMv7 and ARMv8 userland and baremetal assembly, ANSI C, C++ and POSIX C. GDB step debug and KGDB just work.

Using latest build (ios-v3.1.1) I get the following over and over again - no crashes‚Äč; it seems to Failed to make complete framebuffer object 8cd6 2016-02-22 #‚Äč1572 tracks making the map view handle this situation correctly. This lesson shows you how to create a new Android project with Android Studio, and it describes some of the files in the project. To create your new Android project, follow these steps: Install the latest version of Android Studio .

I am getting an interesting warning at build time (iPhone simulator) that gives the framebuffer object 8cd6 (iOS, programmatically created OpenGL view)  Registry: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layouts\E0010409\Layout File KBDUS.DLL\\x00 Creates File: C:\Documents and Settings\Infotmp.txt

To reliably reproduce this, create the folder C:\Test Folder\Origin and the function call returns, it is not guaranteed that removal has completed yet. Regrettably, Remove-Item fails to account for that - and neither do cmd.exe 's Failed to make complete framebuffer object 8cd6 (iOS, programmatically created OpenGL view).

Comments
  • You might try adding some calls to glGetError() to see if everything before that call succeeds.
  • 8CD6 (GL_FRAMEBUFFER_INCLOMPLETE_ATTACHMENT) doesn't mean it "failed to attach the framebuffer" (whatever you mean by that), but that one of its attachments (texture or renderbuffer bound to a color or depth attachment) is incomplete. So it seems it is the renderbuffer storage that is broken somehow.
  • Are you sure the correct FBO is bound when calling glCheckFramebufferStatus?
  • Ahah! I had (incorrectly) assumed that because backingWidth and backingHeight, etc. were getting set properly that everything else before it was OK. After putting in some glGetError() calls I'm getting 1280, GL_INVALID_ENUM after the glBindRenderbufferOES() in resizeFromLayer.
  • @ChristianRau I have very basic experience with OpenGL, on any level, so wasn't entirely sure what the error meant. But now I have a new error code to investigate, thanks to user1118321
  • First, this is an update of your question and no answer. Second, you didn't say if this solved anything. In this case it might be an answer. But third, even then it would be a bad one, since you destroy and create a new FBO each time the window/whatever is resized. It would only be a workaround the real problem, which must be somewhere else.
  • "I have it sorted thanks to the two users above, who helped me realise something." - how is that me not saying it solved the problem? This method seems to be a fairly standard way of handling it on iOS.
  • Chistian in iOS you do destroy and re-create the frame buffer when the devide is re-oriented - which requires resizing it. It's the standard way of doing it in iOS.
  • I had a similar problem, only the problem was that my GLKView had a zero size. Self.window was non-nil, and if I held off rendering until the size was non-empty (maybe autosizing hadn't run yet), it worked fine.
  • @prewett - this was my issue too. Thanks!