Results 1 to 4 of 4

Thread: Modifying image-texture-test example

  1. #1

    Modifying image-texture-test example

    I am learning about texture based on ... ing_Images

    I replaced test_texture.jpg with gorilla.jpg as shown below:
    Code :
    function init() {
        gl.clearColor(0., 0., .7, 1.);
        gl.viewport(0, 0, g_width, g_height);
    //    g_texture = loadTexture("test_texture.jpg"); // original code. it works
        g_texture = loadTexture("gorilla.jpg"); // this texture does not show up

    Both test_texture.jpg and gorilla.jpg have the same properties: 256x256 pixels, 72 dpi, bit depth: 24

    Unfortunately, the gorilla.jpg does not show up.

    What did I do wrong?

    Thanks in advance for your help.

  2. #2
    Senior Member
    Join Date
    May 2010

    Re: Modifying image-texture-test example

    Obviously, if all you've done is change the filename, that's not going to be an issue. So the odds are high that it's something wrong with the image. You're going to need to at least post the URLs where we can download these images to see what's going amiss otherwise there is zero chance that we can help.

  3. #3

    Re: Modifying image-texture-test example

  4. #4

    Re: Modifying image-texture-test example

    Quote Originally Posted by pion
    Additional info ...

    I then tried running the SpiritBox.html from ... os/webkit/ as explained on

    The demo works fine.

    I then replaced the texture with the above gorilla.jpg. I works fine, too.

Similar Threads

  1. Replies: 2
    Last Post: 10-27-2010, 05:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean