View Full Version : Calling obsolete TexImage2d
07-09-2010, 01:28 AM
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 :-(
07-15-2010, 05:59 PM
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.
07-21-2010, 02:46 AM
WebGL is only meant to offer very limited support for power-of-two textures (see http://www.khronos.org/webgl/wiki/WebGL_and_OpenGL_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.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.