Seems Im the only one asking things, anyways here goes
1/ how to change a webgl canvas’s AA value whilst it already exists?
at start up either
gl = canvas.getContext(“experimental-webgl”, { antialias:true } // works
or
gl = canvas.getContext(“experimental-webgl”, { antialias:false } // works
but if it already exists how to change its value i.e. if its
gl = canvas.getContext(“experimental-webgl”, { antialias:true }
and the I call
gl = canvas.getContext(“experimental-webgl”, { antialias:false }
it will still stay true, I assume I have to destroy the webgl context first + then create a new one? If so whats the best way, or is it possible to change AA on the fly?
2/ (not really webgl also only a minor thing) but how to set a canvas elements zdepth
Ive tried canvas.setAttribute( “style”,“z-index: 0” ); + also here
<canvas id=“GLcanvas” style=" … " as well, also
document.getElementById(“GLcanvas”).style.zIndex="-1";
but the values I give it are ignored, which means all the html text I have to give a higher value than the canvas’s zvalue, Ild just prefer changing the single webgl canvas value. Note - I can change a canvas element z-value if its a 2d canvas i.e.
document.getElementById(‘canvas2D’).getContext(‘2d’);
but it seems with webgl canvas’s you cant
3/ same scene drawing a blended (src_alpha,1-src_alpha) quad over the scene afterwards.
but the background is showing through!
This seems like its a bug in the brower implementation but it occurs both with chrome(*) + firefox, so is this expected behaviour.
top gl = canvas.getContext(“experimental-webgl”, { alpha:true,
top gl = canvas.getContext(“experimental-webgl”, { alpha:false,
(*)though chrome doesnt run webgl anymore for me since yesterday, gah
Lots of text, well cheers anyways Zed