yardex / blender-webgl-exporter

Automatically exported from code.google.com/p/blender-webgl-exporter
0 stars 0 forks source link

animation-example errors #20

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. load index.html into chrome v13.0.782.112 / FireFox 6., either by file or 
localhost (Apache)

What is the expected output? What do you see instead?

Alert : 'The page at localhost says Error 0:2 No precision specified for (float)
Alert : Cound not initialise shaders

Chrome - console - Uncaught ReferenceError: WebGLFloatArray is not defined

What version of the product are you using? On what operating system?

xp sp3

Original issue reported on code.google.com by MikeStra...@gmail.com on 21 Aug 2011 at 3:59

GoogleCodeExporter commented 9 years ago
I have the same problem with XP Home SP3 and with Vista Home SP2.  On XP I 
tested under Chrome and Opera, on Vista Home I tested on Firefox.  All examples 
and all browsers give the same error.  See attached jpg from Chrome on XP.

Original comment by rjharri...@gmail.com on 23 Dec 2011 at 11:05

Attachments:

GoogleCodeExporter commented 9 years ago
I have the same problem too, with the last firefox and windows 7 32-bits

Original comment by alexis.v...@gmail.com on 13 Jan 2012 at 1:13

GoogleCodeExporter commented 9 years ago
The WebGL spec has changed and these samples are still based on the old version 
of the learningwebgl.com tutorials.  
Check out this link for more information:
http://learningwebgl.com/blog/?p=2507

The following modifications to index.html seemed to fix these issues for me:

(1) Specify precision in the fragment shader:
     After the line <script id="shader-fs" type="x-shader/x-fragment">
         add: precision mediump float;

(2) Fix gl.texImage2D(...) -- See the blog post above for more details on this.

(3) Find/Repace - WebGLFloatArray -> Float32Array, WebGLUnsignedShortArray -> 
Uint16Array

Original comment by chrischa...@gmail.com on 1 Apr 2012 at 6:13