[Public WebGL] NPOT (non-power-of-two) textures

stephen white [email protected]
Sat Jan 16 19:16:53 PST 2010


On 17/01/2010, at 10:45 AM, Chris Marrin wrote:
> 2) Allow use of this hardware for WebGL, but disallow the use of  
> mipmaps with NPOT textures. Have glError return an error when either  
> calling texImage2D with a NPOT texture and LINEAR_MIPMAP_LINEAR is  
> set, or when setting LINEAR_MIPMAP_LINEAR when a NPOT texture is set.

I'm finding a couple of other cases which go to software fallback even  
when I update it to use LINEAR instead of LINEAR_MIPMAP_LINEAR, so  
there may be a need for a more generic solution than just the NPOT  
issue. I like the option of number 2, as knowing about the failure to  
run in hardware offers the programmer the option of changing some  
settings and trying again, rather than simply not knowing and having  
no options at all.

Thanks for the earlier replies, and I agree with the observations that  
were made. I do have a further point for consideration though. The  
deprecated API section would _not_ have to run on all hardware. It  
would be fine to have some calls that only run on one or two  
platforms, in much the same way that there's IE only code, or Opera  
only code. From this perspective, there isn't an issue with an extra  
definition like GL_TEXTURE_RECTANGLE_ARB.

It's a bit odd how OpenGL has had a long tradition of not allowing the  
programmer to probe settings and get answers. "Would this be software  
or hardware?" is a very useful call! :)

--
   [email protected]

-----------------------------------------------------------
You are currently subscribe to [email protected]
To unsubscribe, send an email to [email protected] with
the following command in the body of your email:




More information about the public_webgl mailing list