WebGL Texture malfunction - html5-canvas

I am trying to get the hang of WebGL and I am following tutorial. http://learningwebgl.com/blog/?p=507
I got the color going but I can see the texture for some reason. I tried using a PNG, since it was showing just a black object with out adding the texture I used the image from the tutorial but still I am getting the same black cube with out the texture. I have pasted the code to the following link.
Pastbin Link
I appreciate if someone could give me some pointers to get this working.

In which browser have you tried? In Chrome textures are not showing offline, maybe this is the problem.

A possible hack solution is to start Chrome with option --disable-web-security.
It will give you a warning about compromised safety, so maybe you should use this only when looking at your local files...

Related

Why does Unity automatically outline my images?

my Unity is automatically outlining my images. Do you know why and how I can turn it off? Here is how it should look like (looks like in windows fotos):
And here how it looks like in Unity. Any tips on how to remove this?
I tried Using Raw Image and normal Image but none worked.
Thanks for any help.
Texture Import Settings lets you set the texture details. In your case, I’d suggest starting with a Clamp for Wrap Mode, and Point for Filter Mode.

Crop image from image with Libgdx

I'm developing an application for Android with Libgdx.
I would like to get the effect produced in the image by using two images.
Any suggestions? The guides that I found did not help to solve the problem.
This can just be achieved using the alpha channel of the image? Why do you need a second image? If you really need two images you could just use a shader to achieve it Link, a good tutorial to get started can be found here.

gif image not looping

I have created a gif in photoshop. It has two frames displayed for 4 seconds each and is on a loop forever.
For some reason the image freezes on the second frame and does not continue to load in some browsers (The exact information about browsers and / or versions is unclear at the moment but it has happened in the latest version of chrome).
The image is embedded in the code in the standard way, no javascript is used and nothing is changing the element.
Does anyone have any idea what could be causing this? Everything I have searched for so far seems to result in people saying "Oh, I forgot to put make the gif loop forever" instead of any real reasons for causing this problem.
Thank you for your help!
Edit: Sorry I didn't think about putting an image in the original post. He is an example of one advert which doesn't seem to work.
Because the current image displays correctly in everything I've tryed so far, try to create image in different application.
Some applications you may try:
GIMP - tutorial
Some freeware crap.
I'd vote for GIMP. Its complicated, but its free and it has wide user suport.
If you still fail...
Now its time to check the enviroment. First, open the image on different machine. Maybe there is something wrong with your browser instalation. In this case, reinstall.
Try to upload on different server. Maybe your browser does not correctly decompress deflated data or has other communication issues.

IE not rendering png background image properly

I have create a PNG arrow graphic for use in a client's website. It render's perfectly everywhere except in IE 6,7,8 and 9. I have attached an image for you to examine and have already tried 2 different IE png fix scripts - one jquery and one a css behaviour .htc file.
Please assist me.
Thanks
Jamie
Image: http://i51.tinypic.com/2w1uzqe.jpg
Sorry to say that but for 5 years i've been looking for 100% working hack for png transparency bug in IE's with no result. There are many of them and usually each of them doesn't work here and there.
Try using transparent gif instead or crop arrow image with background along. It will take few more bytes of White color so won't damage your performance that much.
The bug that IE PNG Fix scripts are designed to fix is only a problem for IE6 and lower.. hmm.. possibly IE7? I forget. In any case, IE8 fixed the issue, and IE9 definitely shouldn't have it. These IE versions may still have plenty of bugs, but the old well known PNG background issue isn't one of them.
My guess is that there may be a corruption in the PNG file itself.
My suggestion is to try loading the PNG image into Photoshop (or your favourite graphics app), and re-save it. That may be all you need to do to solve the issue.
Failing that, would you be able to give us a link to the actual PNG file, so we can have a look as well?

Using a background image on a flot diagram/excanvas in IE

I'm trying to use the excanvas/JQuery based "Flot" plugin but would like to use a background image. At the moment however there is a bug that means it's not possible to set a background image to the canvas using CSS - the bug is described here and here.
Has anyone managed to get around this bug? It's incredibly frustrating as using CSS to provide a background image to a canvas appears to be valid in every other browser; but not using IE and excanvas!
Any help would be appreciated! I've tried nested divs and more - and I'm running out of ideas!
Thanks in advance
Edit:
There's a possible workaround here - http://code.google.com/p/flot/issues/detail?id=129 - but it seems a bit outdated as a lot of the flot code isn't the same anymore. I guess it does give me something to start with however! If anybody has an easier solution I'd be happy to hear it!

Resources