Screenshot in fullscreen

Ah cool.

I don’t get why the solution works then… Shouldn’t we technically be reading pixels from GL_BACK before calling Display.update(), since that’s where the game’s being rendered to?

game loop
    render game
    if screenshot requested
        glReadBuffer(GL_FRONT) <-- wouldn't GL_BACK make more sense?
        glReadPixels etc
    Display.update()

Nah sometimes the rendering isn’t fully finished. Reading from the front is what the user is currently seeing so that makes more sense :wink:

Don’t confuse him. Calling glGetPixels() blocks the CPU until everything’s rendered. It’s not possible to get a half-rendered frame because the GPU wasn’t finished yet.

GL_FRONT = read what the player sees. It does make more sense, but that was when the bug occured, right?