views:

73

answers:

2

Anyone know of an example of an opengl implementation of something like the Gallery widget? Basically, I am looking for an example of how to horizontally scroll a list of images using opengl. I have seen this behavior in the Gallery 3D app from cooliris but there is ALOT of code in that app and I haven't been able to figure out how it works exactly. I am new to using opengl.

+1  A: 

What you are looking for is texture mapping. NeHe has the most complete collection of tutorials on OpenGL. I highly recommend you to take a look.

I don't think you're gonna be able to copy/paste code in this case without some understanding of how OpenGL works.

For specific example on how to load 2D textures you can check this one.

karlphillip
I have applications on the market and am capable of writing code... so I am not looking for a copy and paste solution. I just need some example to point me in the right direction.
androidworkz
OpenGL act as a State Machine. If allow youself to spare a few minutes to read about it, it will make your life much easier when the first problems of copy/pasting code start showing up.
karlphillip
A: 

Step 1: Load thumbnails into a texture atlas. Look into bin packing for atlas layout ideas.

Step 2: Render a bunch of rectangles with texture coordinates that map into the correct parts of your texture atlas.

genpfault