It's the way OpenGL maps texture co-ordinates, ie it's working correctly.

On Monday, January 14, 2013 2:59:45 PM UTC, bob wrote:

> Has anyone else noticed that GLUtils.texImage2D seems to want the image to 
> be upside down?
>
> GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0);
>
> One way to see this is to look at Cosmin Banu's NeHe code here:
>
>
>
> http://code.google.com/p/nehe-android/source/browse/trunk/NeHe06/src/ro/brite/android/nehe06/Utils.java
>
> He has this in there:
>
>       private static Matrix yFlipMatrix;
>         
>         static
>         {
>                 yFlipMatrix = new Matrix();
>                 yFlipMatrix.postScale(1, -1); // flip Y axis
>         }
>
> And this:
>
> return Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), 
> bitmap.getHeight(), yFlipMatrix, false);
>
>
> I have independently noticed this, and it caused a lot of frustration.
>
> Any ideas how to best solve this?  Obviously, if we "just fix it", it will 
> break a lot of old code that relies on its currently incorrect behavior.
>
>

-- 
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