Results 1 to 3 of 3

Thread: Framebuffers and Renderbuffers

  1. #1

    Framebuffers and Renderbuffers

    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.

  2. #2
    Member Coolcat's Avatar
    Join Date
    Oct 2009
    Location
    NRW, Germany
    Posts
    75

    Re: Framebuffers and Renderbuffers

    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.

    Origin Restrictions
    In order to prevent information leakage, the HTML5 canvas element has a origin-clean flag. (See HTML5, section 4.8.11.3, "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.

  3. #3

    Re: Framebuffers and Renderbuffers

    Wasn't security, my issues ended up being using the wrong pixel format and had Y coordinates flipped, thanks for the help though.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •