We're calling on all EU-based Mozillians with iOS or iPadOS devices to help us monitor Apple’s new browser choice screens. Join the effort to hold Big Tech to account!

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

WebGL programs using textures are not visible on FF4 RC1 on Samsung Galaxy Tab

  • 4 回覆
  • 16 有這個問題
  • 2 次檢視
  • 最近回覆由 Juriy

more options

I am unable to view any WebGL sites which use textures on Firefox 4 RC on the Samsung Galaxy Tab.

An example is <http://learningwebgl.com/lessons/lesson05/index.html>. WebGL lessons till lesson 4 work on the tablet, but not this one or any other lesson which uses textures.

I am unable to view any WebGL sites which use textures on Firefox 4 RC on the Samsung Galaxy Tab. An example is <http://learningwebgl.com/lessons/lesson05/index.html>. WebGL lessons till lesson 4 work on the tablet, but not this one or any other lesson which uses textures.

所有回覆 (4)

more options

Yeah, I've seen this problem too, I've even made a minimal test case: http://people.mozilla.org/~bjacob/webgltexture/

No clue though :-( it works on other phones.

more options

I have tried the same example in Galaxy S and Nexus S with FF4 release, experiencing the same problem - the textured scene looks blank.

What phones have you tried that worked fine with textures? Has anybody tried XOOM with FF4 & WebGL?

UPDATE: also tried fennec build on Win7 - the same story (I had to set forceWebGL though, it is probably related to the old version of my graphic driver)

UPDATE 2: the animation is actually running, but the texture is rendered black, if you change the clear color to white, you'll see it

由 Juriy 於 修改

more options

Webgl is not supported on Mobile devices. There is an open bug that we are looking to get fixed after the release of Firefox Mobile 5.

more options

I have found the workaround for this bug: when you use the

gl.texImage2D(...);

with the image as the last parameter it throws some sort of exception that looks quite useless for the JavaScript developer.

So here is the workaround. You can create another Canvas element on the page and render the texture on it's 2d context. Then pass the canvas element (not the context) as the last parameter to texImage2D - it will work just fine.

I'm making a small showcase on my blog I'll post the link here, but it should be pretty obvious how to deal with the problem. The solution was tested on Galaxy S and Nexus S.