Results 1 to 3 of 3

Thread: Calling obsolete TexImage2d

  1. #1
    Junior Member
    Join Date
    Jul 2010
    Posts
    2

    Calling obsolete TexImage2d

    Hi, I have been trying to run several different samples that render text onto a texture, e.g. http://murfy.de/webgl/timecrate.html, and I'm using the latest chromium, but I always get the console warning 'Calling obsolete texImage2d(..)', and although the text renders in the 2d canvas, it doesn't render in the 3d canvas.

    Does anyone else know how to fix this problem? I tried updating my graphics card drivers (a GeForce 9300 GS) but doesn't fix it

  2. #2
    Junior Member
    Join Date
    Jul 2010
    Posts
    2

    Re: Calling obsolete TexImage2d

    Here's the fix, just make the canvas width and height a power of 2, e.g. 128*512 etc. Voila.
    It will work with non-powers of two in minefield.

    The console warning was a red herring, it doesn't seem to matter.

  3. #3
    Member
    Join Date
    Oct 2009
    Location
    London, UK
    Posts
    90

    Re: Calling obsolete TexImage2d

    WebGL is only meant to offer very limited support for power-of-two textures (see http://www.khronos.org/webgl/wiki/We...GL_Differences) but Minefield doesn't currently enforce the restriction if your graphics card can handle NPOT -- which is true of most desktop graphics cards, but of few mobile/embedded ones. It's best to stick to power-of-two.

    The signature for texImage2d has changed, but I think Chrome is kindly supporting both old- and new-style calls right now; this is probably not something we can rely on in the long term, but (as you say) isn't likely to cause issues right now.


    Cheers,

    Giles

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •