[android-developers] Re: OpenGL texture is upside down
fill texture buffer starting from upper right coordinate, u would find it right. On Dec 29 2008, 5:33 am, Tom H tomhi...@gmail.com wrote: Hello. I'm trying to map atextureon a surface, but it's showing up inverted (upside down). It works correctly in WindowsOpenGL. Here are the relevant code pieces: Bitmap b = BitmapFactory.decodeResource(getResources(), R.drawable.myBitmap); ... android.opengl.GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, b, 0); I'm usingtexturecoordinates with the origin in the lower left corner, like I should. The image resource is a PNG file which shows correctly in all image viewers. Any ideas? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: OpenGL texture is upside down
On Dec 29, 9:18 pm, Tom H tomhi...@gmail.com wrote: I'm using texture coordinates with the origin in the lower left corner, like I should. I haven't messed around with OpenGL ES, but in OpenGL you can change the orientation by changing the texture coordinates origin. Instead of starting with the lower left, try starting from the upper left, IIRC. ~clark --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: OpenGL texture is upside down
I think Android wants texture to use upper-left as the origin. Have you checked API demo? --- On Sun, 12/28/08, Tom H tomhi...@gmail.com wrote: From: Tom H tomhi...@gmail.com Subject: [android-developers] OpenGL texture is upside down To: Android Developers android-developers@googlegroups.com Date: Sunday, December 28, 2008, 4:33 PM Hello. I'm trying to map a texture on a surface, but it's showing up inverted (upside down). It works correctly in Windows OpenGL. Here are the relevant code pieces: Bitmap b = BitmapFactory.decodeResource(getResources(), R.drawable.myBitmap); ... android.opengl.GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, b, 0); I'm using texture coordinates with the origin in the lower left corner, like I should. The image resource is a PNG file which shows correctly in all image viewers. Any ideas? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: OpenGL texture is upside down
I just checked TriangleRenderer.java in the API demos (API Demos / Graphics / OpenGL ES / Textured Triangle). It's upside down too. On Dec 29, 5:38 pm, Tomei Ningen tomei.nin...@yahoo.com wrote: I think Android wants texture to use upper-left as the origin. Have you checked API demo? --- On Sun, 12/28/08, Tom H tomhi...@gmail.com wrote: From: Tom H tomhi...@gmail.com Subject: [android-developers] OpenGL texture is upside down To: Android Developers android-developers@googlegroups.com Date: Sunday, December 28, 2008, 4:33 PM Hello. I'm trying to map a texture on a surface, but it's showing up inverted (upside down). It works correctly in Windows OpenGL. Here are the relevant code pieces: Bitmap b = BitmapFactory.decodeResource(getResources(), R.drawable.myBitmap); ... android.opengl.GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, b, 0); I'm using texture coordinates with the origin in the lower left corner, like I should. The image resource is a PNG file which shows correctly in all image viewers. Any ideas? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: OpenGL texture is upside down
I just checked TriangleRenderer.java in the API demos (API Demos / Graphics / OpenGL ES / Textured Triangle). It's upside down too. On Dec 29, 5:38 pm, Tomei Ningen tomei.nin...@yahoo.com wrote: I think Android wants texture to use upper-left as the origin. Have you checked API demo? --- On Sun, 12/28/08, Tom H tomhi...@gmail.com wrote: From: Tom H tomhi...@gmail.com Subject: [android-developers] OpenGL texture is upside down To: Android Developers android-developers@googlegroups.com Date: Sunday, December 28, 2008, 4:33 PM Hello. I'm trying to map a texture on a surface, but it's showing up inverted (upside down). It works correctly in Windows OpenGL. Here are the relevant code pieces: Bitmap b = BitmapFactory.decodeResource(getResources(), R.drawable.myBitmap); ... android.opengl.GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, b, 0); I'm using texture coordinates with the origin in the lower left corner, like I should. The image resource is a PNG file which shows correctly in all image viewers. Any ideas? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---