I was not talking about scaling but instead talking about texture
mapping which is known as UV or UVW mapping by some and S&T mapping by
openGL guys.

In the past I've been able to use 3dsmax to do my UVW map and then
export it along with my mesh but I haven't gotten into all of that
with Android yet.

On Dec 5, 5:04 am, Guian <[EMAIL PROTECTED]> wrote:
> here is my solution :
> (very simple with the Bitmap from android SDK ;) )
>
> its NOT possible to load non power of two size bitmap as texture
>
> but it's very easy to resize our bitmap  ;)
>
> =>
>
> [syntax="java"]
>
>         //correct the bitmap if its not a power of two width
>         if(((Math.log((double)bitmap.getWidth())/Math.log(2.0))
>                         - 
> Math.floor((Math.log((double)bitmap.getWidth())/Math.log
> (2.0)))) != 0){
>                 //the bitmap width isn't a power of two.
>
>                 int aimWidth = (int) Math.pow(2,Math.ceil(Math.log((double)
> bitmap.getWidth())/Math.log(2.0)));
>
>                 bitmap = Bitmap.createScaledBitmap(bitmap, aimWidth,
> bitmap.getHeight(), false);
>                //you can adapt the height in the same way if needed.
>         }
> [/syntax]
>
> ;)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to