Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
drawingBufferWidth/Height are different when running with WebGL Inspector #127
See here for a test app to run with and without WebGL Inspector:
If you open playcanvas_latest.js in Chrome's sources tab and set a breakpoint at line 4223, that is where drawingBufferWidth is being queried and you can see the discrepancy. Any idea why this is happening?
I've done a little more investigation and I think I see why this is happening. WebGL Inspector breaks in the case where you resize the canvas AND rely on drawingBufferWidth/Height.
With WebGL Inspector enabled, if after getting a WebGL content from a canvas you do:
Then drawingBufferWidth/Height will not automatically update in to reflect the resize. This is what happens when WebGL Inspector is not active.
So is this the place to fix this problem:
Seems as though a hacky fix would be to do a special case here like:
What do you think?