deepkolos

原来 THREE.JS 是这样 readPixels,有大佬知道具体原因么?

  •  
  •   deepkolos · Jan 23, 2021 · 1642 views
    This topic created in 1948 days ago, the information mentioned may be changed or developed.

    https://github.com/mrdoob/three.js/blob/master/src/renderers/WebGLRenderer.js#L1903

    翻 three 的代码发现,readPixels 之前需要检查 frameBuffer 是否完成了

    有大佬知道具体原因么?

    no1xsyzy
        1
    no1xsyzy  
       Jan 24, 2021
    https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/readPixels#exceptions

    A gl.INVALID_FRAMEBUFFER_OPERATION error is thrown if the currently bound framebuffer is not framebuffer complete.
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3197 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 12:31 · PVG 20:31 · LAX 05:31 · JFK 08:31
    ♥ Do have faith in what you're doing.