Re: [Plib-users] ssgMakeMipMaps
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2004-04-23 04:06:30
|
jnilson_99 wrote: > i think you're missing the point. an image doesn't need to be sized based on > a power of two. only MIPMAPS need to be sized to a power of 2. No - that's not true. Even top level maps - or non-MIPmapped textures must be a power of two in size in each dimension. According to the RedBook description of glTexImage2D: "The width and height parameters give the dimensions of the texture image; border indicates the width of the border, which is either zero (no border) or one. Both width and height must have the form 2^m + 2b, where m is a nonnegative inteager (which can have a different value for width than for height) and b is the value of border." ...so, presuming you aren't using a one pixel border, your map has to be a power of two in both dimensions....no exceptions. You *might* get away with it in some (broken) OpenGL implementations - but it's definitely not legal and if your OpenGL library doesn't report a GL_INVALID_VALUE error when you do it - then there is a definite bug in your OpenGL library because the specification of that functions says it MUST produce that error. ---------------------------- Steve Baker ------------------------- HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://www.sjbaker.org Projects : http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net -----BEGIN GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++ -----END GEEK CODE BLOCK----- |