Refactor some of the GL error code and only return a ByteBuffer for screenshots (reading the current frame)

Signed-off-by: Aleksi Sapon <QcTechs@gmail.com>