Can anybody refer me some pdf or ebook that i should follow for basic 2d programming and texture ,shaders and other gaming elements details in depth.By which i can easily get through the 2d game programming.
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It only takes a minute to sign up.Sign up to join this community
Since "2D Programming" is really now just 3D Programming, but with an orthographic viewpoint, what you need to look for is how to draw 2D things in 3D, using OpenGL.
When I did this I found the websites out there were often incomplete, too old or were written for the "wrong" OpenGL.
And that's what you need to choose first - do you want to write things on a Mac, or do you want to write things on an iOS device? Don't try to do both at once - for your first attempt don't even think about porting your code, stay focused on one platform and learn it. If you want to use an iOS device which OpenGL do you want to use? OpenGL ES 1.1 or OpenGL ES 2.0? If you don't understand the difference there's plenty of answers on this site.
Once you've decided all of that, just start Googling for things like "OpenGL orthographic projection" and "2D drawing in OpenGL" etc and find a site that makes sense to you. The key words are "orthographic projection". Also buy the correct OpenGL book which would be a great follow-up question - "What OpenGL book should I get for learning OpenGL "