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

defaultState.viewport is never updated #51

Closed vorg closed 5 years ago

vorg commented 5 years ago

This should reflect default canvas size

vorg commented 5 years ago

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

vorg commented 5 years ago

Implemented here https://github.com/pex-gl/pex-context/blob/master/index.js#L825

ctx.defaultState.viewport[2] = graph.ctx.gl.drawingBufferWidth ctx.defaultState.viewport[3] = graph.ctx.gl.drawingBufferHeight