-2

I want to get touched x and y of a bitmap and i found a solution here :

How to convert coordinates of the image view to the coordinates of the bitmap?

but it doesn't work in opengl custom view

i use harsim page curl library

could any one tell me what's wrong in using the above solution in custom OpenGl view ?

thanks

Community
  • 1
  • 1
amorenew
  • 10,760
  • 10
  • 47
  • 69

1 Answers1

0

You can use glReadPixels(int x, int y, int width, int height, int format, int type, Buffer pixels) , for every version of OpenGL in android. Obviously call this in the GL thread. Also check out this question for more example.

Community
  • 1
  • 1
Sipka
  • 2,291
  • 2
  • 27
  • 30
  • this example is about using glreadpixels to return colors of the pixel but i want the original x and y of the image in this glsurfaceview. – amorenew Dec 11 '13 at 14:32