Webgl only renders part of the large texture

Viewed 13

I am trying to render an image to webgl. But I found if I use a small size image(4624 × 3468, 10M), the webgl can render full image. If i use a large size image(9248 × 6936, 36.6M), the webgl just renders part of the texture.

I tried to print out the gl.drawingBufferWidth and gl.drawingBufferHeight. I found the gl.drawingBufferWidth not equals to the canvas.width. If I try to render an image(9248 × 6936, 36.6M), the gl.drawingBufferWidth and gl.drawingBufferHeight are 6651 and 4988 respectively. Meanwhile another image(8640 × 5760, 33.8M), the two value are 7054 and 4703 respectively.

Is there a maximum drawingBufferSize limit?

How can I render a full large texture?

0 Answers
Related