View Full Version : Framebuffers and Renderbuffers
02-23-2010, 08:30 AM
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.
02-23-2010, 08:42 AM
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 126.96.36.199, "Security with canvas elements".) For a WebGL context, the origin-clean flag must be set to false if any of the following actions occur:
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.[/*:m:1gu8g3j7]
The texImage2D method is called with an HTMLCanvasElement whose origin-clean flag is set to false. [/*:m:1gu8g3j7]
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.
02-23-2010, 03:46 PM
Wasn't security, my issues ended up being using the wrong pixel format and had Y coordinates flipped, thanks for the help though.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.