I draw changing bar in OpenGL ES it has coords (x,y,z).
I would like to add some changes (example: colors in bar) on Action_Down. There is
getX(), but this method returns the x coordinate in pixels, but not corresponding coords in OpenGL. Is there some class to convert OpenGL coords to pixels? Or is there any formula for it?
I think you’re looking for this:
It takes coordinates and maps them to window coordinates, with (0, 0) at the top left.