Skip to content

drawingBufferWidth/Height are different when running with WebGL Inspector #127

Open
@willeastcott

Description

@willeastcott

Hi,
WebGL Inspector has not worked properly with PlayCanvas for such a long time now. :( So I've just spent a little time looking into why. Seems to be related to the value of drawingBufferWidth/Height. When running without WebGL Inspector, this is the same as canvas.width/height. However, when running with WebGL Inspector, drawingBufferWidth/Height are 300 and 150 respectively (which I believe is the default width and height of a canvas as creation time. So when I activate WebGL Inspector on a PlayCanvas app/game, the canvas is 300x150 in the lower left of the tab. Any idea why this might be happening?

See here for a test app to run with and without WebGL Inspector:

http://playcanvas.github.io/load_model/index.html

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions