OpenGL ES 2 – glSwapBuffers?

| | August 6, 2015

this is what i do to blit FBO onto screen in ViewController:

[m_Context presentRenderbuffer:GL_RENDERBUFFER];   

but i need something like glSwapBuffers, so that i can call it somewhere from the engine code ( which is cpp ) – to refresh the screen in special cases – is this available for iOS / how can i implement it – if i can at all..

One Response to “OpenGL ES 2 – glSwapBuffers?”

  1. Ok, i have solved it by a small util function:

    void SwapBuffers()
    {
        EAGLContext* context = [EAGLContext currentContext];
    
        [context presentRenderbuffer:GL_RENDERBUFFER];     
    }
    

Leave a Reply