On 2014/01/16 11:35, Bram Stolk wrote:
> After modifying the script a bit, I can see that
> MOZ_WEBGL_depth_texture is there.
> But the depth texture creation still fails.
> I found the console feature in firefox (I'm new to web dev) and saw
> this output:
>
> /11:30:34.395 [object WebGLExtensionDepthTexture] swaag.js:5923/
> /11:30:35.146 "ignoring setsockopt command" swaag.js:7672/
> /11:30:35.103 Error: WebGL: texImage2D: with format of
> DEPTH_COMPONENT or DEPTH_STENCIL target must be TEXTURE_2D, data
> must be nullptr, level must be zero/
>
>
> Modified script:
>
> / char req[] =/
> / "var ctx =
> Module.canvas.getContext('experimental-webgl');\n"/
> / "var wk_dt =
> ctx.getExtension('WEBKIT_WEBGL_depth_texture');\n"/
> / "var mz_dt =
> ctx.getExtension('MOZ_WEBGL_depth_texture');\n"/
> / "console.log( wk_dt );\n"/
> / "console.log( mz_dt );\n";/
> / emscripten_run_script(req);/
>
> I don't understand why it claims that data must be null pointer?
> I use this code on many different devices, yet WEBGL does not like it.
Because WEBGL_depth_texture
<http://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/>
and ANGLE_depth_texture
<http://angleproject.googlecode.com/svn/trunk/extensions/ANGLE_depth_texture.txt>
on which it is based say they do not support loading image data via the
TexImage or TexSubImage commands. They do not give a reason, which is in
my view a flaw in the ANGLE_depth_texture's issues list.
A couple of notes on the script: WEBGL_depth_texture has been a ratified
extension since 2013.05. There should be no need to use WEBKIT and MOZ
prefixes any more; Several browsers have passed WebGL conformance so
getContext('webgl') should be tried before 'webgl-experimental'.
Regards
-Mark
--
注意:この電子メールには、株式会社エイチアイの機密情報が含まれている場合
が有ります。正式なメール受信者では無い場合はメール複製、 再配信または情
報の使用を固く禁じております。エラー、手違いでこのメールを受け取られまし
たら削除を行い配信者にご連絡をお願いいたし ます.
NOTE: This electronic mail message may contain confidential and
privileged information from HI Corporation. If you are not the intended
recipient, any disclosure, photocopying, distribution or use of the
contents of the received information is prohibited. If you have received
this e-mail in error, please notify the sender immediately and
permanently delete this message and all related copies.
--
You received this message because you are subscribed to the Google Groups
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.