how to get data from image list to opengl.

how to get data from image list to opengl.

Post by Pete » Sun, 18 May 2003 00:55:20


Hi,

can anyone suggest or point to a tutorial, on how i can store mutliple
1024x768 bitmaps in an image list, then access the pixel data to display the
images full screen in opengl, eg as if it were on opengl picture viewer ?

any advice appreciated

thanks

Peter

 
 
 

how to get data from image list to opengl.

Post by Ananth B » Sun, 18 May 2003 03:30:42


Hi Peter,
    You will need the following before you start,

0. Several 1024x768 bitmaps, did you say? You will need a video card with
loads of video memory!
1. A bitmap loader that creates OpenGL textures from Bitmaps/JPEGs/TGAs (you
can find that code over at either www.gametutorials.com or
http://nehe.gamedev.net)
2. Set up an ortho mode like so

  glViewport(0, 0, aWidth, aHeight);
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  glOrtho(0.0, aWidth, aHeight, 0.0, -1.0, 1.0);
  glMatrixMode(GL_MODELVIEW);
  glLoadIdentity();

3. Create your display list like so
myPictureList = glGenLists(1);
glNewList(myPictureList, GL_COMPILE);
// Bind the texture and draw the fullscreen quad here
glEndList();

4. To display it, simply call
glCallList(myPictureList);

Hope this helps,

Regards,
Ananth B.


Quote:> Hi,

> can anyone suggest or point to a tutorial, on how i can store mutliple

[snip]

 
 
 

1. Getting 16bpp image data

Hi, I'm working on a plug-in for the Gimp that saves data in a custom
sprite format to be used in a game I'm working on.  I have the plug-in
up and  saving images (loading isn't implemented yet), and it works.
Cool.  The problem is that The Gimp will only save 4 bytes per pixel
data.  Since my game video engine will run in 16bpp, I need the Gimp to
pass 2 bytes per pixel data.  How can I make The Gimp do that?

--
Ross Vandegrift | Eric J. Fenderson

"Man, I've been working in a retirement home WAY too long."
        --Todd Presson

2. Motion Mixer vs?

3. KPT3 Interform parent list gets truncated

4. About Mesh/Height gird

5. Getting info out of Lists

6. Buying a tablet/pen for use with Fractal DP

7. Getting file list in subdirectories

8. Problem with transparent color in TLabel

9. Getting Started -- 1. Equipment List

10. Getting list of ICONS of current tasks

11. Getting a list of windows printers.

12. Quickly Getting Image Size of Many Images

13. Getting NZ Digital elevation data to make a heightfield