PDA

View Full Version : How do I make a 2D image gallery



munkebo40
06-01-2010, 11:07 AM
Hi

I am trying to learn about openGL, and have a specific application in mind. I was hoping some of you guys would be willing to give some pointers, as to how I can create it.

I want to make a 2D-image gallery. I should look something like this: http://www.mythtv.org/wiki/File:GalleryPics.jpg, with the images displayed row by row.

I know that this could probably be achieved easier using other libraries, but I would like to try to do it using openGL.

The problem is that I don't know where to begin. How do I load in the images (jpg), and how do I display them using OpenGL? Should I treat them as textures?

I hope some of you can help me get started. Thanks in advance!
munkebo40

mhagain
06-01-2010, 01:34 PM
Begin with the "hello world" of 3D graphics; just draw an untextured triangle in a window, then make it spin. You need to get the basics of how OpenGL works, the structure of a program and how it interacts with your windowing system before you start tacking specific projects like this.

(If you've already done this, ignore this post).

ZbuffeR
06-01-2010, 01:54 PM
Then you will need a library to handle the file image loading itself. Then use it as a texture on a quad (a pair of triangles).