hiI want to detect color of touch pixel on any one layer.. " glReadPixels " gives me color of pixel but it consider the whole scene ..in my game their is bg and anther layer on my bg layer .. In this case i want to detect color of touch pixel but it leaves bg layer color and gives only upper layer colorits urgent
I think you should get it by yourself, loop the array and get what you want.
Although many people have asked this very question, I insist that you had better not to judge the RGBA color value from images in opengles games.glReadPixels is very inefficient. You can change the game logic to other ways.