PDA

View Full Version : Unusual bitmap need



Richard Teller
11-07-2005, 04:01 PM
Apologies if this is the incorrect place for this post.

I need to be able to display as fast as possible, one after the other - with absolutely no upper limit for speed - sequences of same-size monochrome bitmaps (about 200KB each and held in RAM) to the screen. The total size of all the bitmaps together is about 100MB so they will all cache in the graphics card. They will be displayed in various sequences for about 15 minutes.

Is OpenGL the way to go, so I can approach or equal the theoretical transfer rate of the card (say 3GB/s equivalent to about 15,000 images per second)?

Client I work for won't explain, so why this is needed is a mystery to me :confused: Obviously all the images won't be seen by the naked eye and none will be anything like fully displayed 'cos of the monitors refresh rate. But anyway.....

Any help very gratefully received.

Thanks in advance
Richard Teller

mikael_aronsson
11-08-2005, 04:01 AM
Hi !

There is probably an upper limit of around 1000 FPS because of some overhead in OpenGL, (if make a very simple scene with just a triangle or something, turn of any waiting for refresh, you usually get something around 1000-1200 FPS, pretty useless of course but anyway).

If you use glDrawPixels the framerate will be much slower, so you will need to store a lot of data in the GPU memory, just remember that a "bitmap" of 128*128 pixels (2KB) will probably use much more memory when stored as a texture for example, but you could of course use bitmaps in a displaylist, but once again, I am not sure it will fit in memory, but you could of course replace the display lists on the fly as you go.

But you can forget about 15000 images per second, and as you said, it would be 100% useless any way.

Mikael

Cheps
11-08-2005, 06:22 AM
You can load all your bitmaps on the graphic card memory, and then there's no transfert rate limitations since everything is already on the graphic card. It's all about how fast can the graphic card render the bitmaps.

Maybe some recent cards may be able to compute 15000 fps, but most API won't refresh display more that once every millisecond, which means 1000 fps max. But you can't display that much on your screen anyways (unless it has a 1000hz refresh rate?).

Richard Teller
11-09-2005, 04:05 PM
Many thanks for your answers, Mikael and Cheps.

1) Is there an easy way in OpenGL to simply load a bitmap (monochrome - ie 1bit/pixel) held in RAM and get it on the screen.

2) Is there a way (or is it necessary) to make the graphics card cache a specific set of bitmaps?

3) For what I want to do would DirectX be as good?

Richard

Cheps
11-09-2005, 10:14 PM
1) Look at NeHe's tutorial: http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=06
It's basically one method to open the file and then one method to load the data on the graphic card. You may want to adapt it to your needs (that one is to load color bitmaps).

2) If there is enough memory available, all images should be loaded on the card, though you can't control it, it's card and driver dependant.

3) It would probably be the same since it's very basic stuff.