Does anyone have a working demo for rendering to a framebuffer then reading pixels from it? GLGE seems it should, but its demos crash my graphics drivers in FF and Chrome.
Maybe your problem is related with the following part of the spec? However, I have only tried to render into an FBO and use it’s data as texture. I have not used readPixels, yet.
In order to prevent information leakage, the HTML5 canvas element has a origin-clean flag. (See HTML5, section 22.214.171.124, “Security with canvas elements”.) For a WebGL context, the origin-clean flag must be set to false if any of the following actions occur:
[ul][li]The texImage2D method is called with an HTMLImageElement or HTMLVideoElement whose origin is not the same as that of the Document object that owns the canvas element.[/1gu8g3j7][/li]> [li]The texImage2D method is called with an HTMLCanvasElement whose origin-clean flag is set to false. [/1gu8g3j7][/ul][/li]> Whenever the readPixels method of the 2D context of a canvas element whose origin-clean flag is set to false is called with otherwise correct arguments, the method must raise a SECURITY_ERR exception.
Wasn’t security, my issues ended up being using the wrong pixel format and had Y coordinates flipped, thanks for the help though.