Mostly working

Seems to work, but using a framebuffer causes an OpenGL error