[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] ANGLE WebGLFramebuffer bug?



This is a bug in Chrome, not in ANGLE.

Happens in Chrome on OSX but not in FF.

On Mon, Apr 18, 2011 at 3:43 AM, Marco Di Benedetto <marco.dibenedetto@isti.cnr.it> wrote:

Hi,

I think I found a problem concerning framebuffer objects with ANGLE (if you use native OpenGL, it works fine).
Basically, if at the end of your draw call you bind a WebGLFramebuffer that is not the main framebuffer ("null"), the page composer (it seems) try to render it on the canvas.
Here follows a minimal example:

<html>
<head>
<script type="text/_javascript_">
window. () {
   // get the WebGL context
   var gl = document.getElementById("TEST_CANVAS").getContext("experimental-webgl");

   // clear canvas to red
   gl.clearColor(1.0, 0.0, 0.0, 1.0);
   gl.clear(gl.COLOR_BUFFER_BIT);

   // create and bind a framebuffer object
   var fb = gl.createFramebuffer();

   // the page composer should always display the main framebuffer, not the currently bound one
   // (comment the following line to see the red canvas)
   gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
}
</script>
</head>
<body>
<canvas id="TEST_CANVAS" width="128" height="128" style="border:1px solid gray;"></canvas>
</body>
</html>


It should display a red canvas. Instead, a blank one appears.

Best,
Marco.

-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------