Webgl Texture

Hi,
I am learning webgl now. When i tried to use texture, nothing was working for me.
I just copied the code from the following link to my machine and tried, but the texture was not working.

https://cvs.khronos.org/svn/repos/regis … itBox.html

      I also copied the code from some other website and tried. At that time also it was not working for me. I checked the image size all the time. It was power of 2.(like 256x256.. 512x512...)

     Could you please tell me what is going wrong here?

Thanks in advance,
Dheepan.

can you run your code on some server or your localhost?
it is possible, that your proble doesnt allow you to use the texture file
when the code is run locally

Hi matej,
Thanks for your reply. The problem is exactly what you have specified. Google chrome is not allowing the local files to run… To make it work, we have to run the chrome browser with the following flag.
“–allow-file-access-from-files”.
Now its working well. Thanks for your time and effort.