javascript - What does it mean if I can render to a floating point texture, but I'm told it's not supported? -


when try following, alert box says "no".

var ext = gl.getextension("oes_texture_float"); if (!ext) {      alert("no");    } 

oes_texture_float not appear in list of supported extensions.

based off of this article, tried determine if can render floating point textures.

var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.teximage2d(gl.texture_2d, 0,gl.rgba, 2, 2, 0, gl.rgba, gl.float, null); gl.texparameteri(gl.texture_2d, gl.texture_mag_filter, gl.linear); gl.texparameteri(gl.texture_2d, gl.texture_min_filter, gl.linear);  var framebuffer = gl.createframebuffer(); gl.bindframebuffer(gl.framebuffer, framebuffer); gl.framebuffertexture2d(gl.framebuffer, gl.color_attachment0, gl.texture_2d, texture, 0);  var check = gl.checkframebufferstatus(gl.framebuffer); if(check != gl.framebuffer_complete){     alert("yes"); } else{     alert("no"); } 

i alert yes. mean extension not supported, can apparently still render textures? can second ability?

thank you!

your check backward. should

if (check === gl.framebuffer_complete) {   alert("yes"); 

also got error you'd see in javascript console

webgl: invalid_enum: teximage2d: invalid type 

Comments