pex-gl / pex-context

Modern WebGL state wrapper for PEX: allocate GPU resources (textures, buffers), setup state pipelines and passes, and combine them into commands.
http://pex-gl.github.io/pex-context/
MIT License
160 stars 12 forks source link

Assert if cmd.pass not null #73

Open vorg opened 5 years ago

vorg commented 5 years ago

Submitting command with null or undefined pass will overwrite parent state and prevents inheriting framebuffer from state which will result in rendering to last used FBO instead of e.g. screen.

const cmdState = this.mergeCommands(parentState, cmd, false)

https://github.com/pex-gl/pex-context/blob/master/index.js#L1093)