Sending .bmps to card directly

Windows 2000/Delphi. I have a need to send many 100,000s of .BMP already stored on disk to the video card as fast as possible. Each .bmp is the same size (64k). With various techniques I have achieved 2400/s but am just using a simple Windows .bmp and displaying it. I am looking at OpenGL to try and improve the speed. I have downloaded all the relevant files but cannot see an API to simply send BMPs to the card. Can anyone help?

Richard Teller
rteller@doctors.org.uk

OpenGL has no inbuilt support for bmps. With the requirement you describe, I’d be surprised if OpenGL can give you any better performance (I’ll wait to be corrected on that one )

Have you considered pre-procesing your bmp’s into a streaming format - maybe AVI if you’re using Windows? Also look at the DrawDib library functions documented in MSDN. This is usually the fastest way to throw bits at the screen.

[EDITED]
2400fps for 64K frames also means you’re reading about 150 Meg per second from disk (if you’re not caching somewhere). Maybe there are other bottlenecks? Are you using PCI or AGP graphics card? What spec is your machine?
[/EDITED]

[This message has been edited by Rog (edited 07-20-2003).]

I don’t think any video card has support for direct copying of BMP to the video card not under openGL or under direct X.

The only way to store them in video memory would be as textures.
And maybe to reduce some overhead would be to convert the BMP files to a raw RGB format.
This way there would be no time used in converting the BMP to the internal format.

I know some cards support some type of texture compression, but I do not know the format.

Many thanks for the help. Pre-processing sounds possible but it would have to be lossless compression and I think avi is lossy? I’ll have a look at DrawDIB.

I have a high spec machine (2x3G processors, 3G RAM, GEF5 VidCard (AGP)) and the disk system is an 8x120GB array with a sort of RAID PCI card that can sustain 200MB/s (which I use for about 1 hour). Be grateful for any other thoughts.

Originally posted by Rog:
[b]OpenGL has no inbuilt support for bmps. With the requirement you describe, I’d be surprised if OpenGL can give you any better performance (I’ll wait to be corrected on that one )

Have you considered pre-procesing your bmp’s into a streaming format - maybe AVI if you’re using Windows? Also look at the DrawDib library functions documented in MSDN. This is usually the fastest way to throw bits at the screen.

[EDITED]
2400fps for 64K frames also means you’re reading about 150 Meg per second from disk (if you’re not caching somewhere). Maybe there are other bottlenecks? Are you using PCI or AGP graphics card? What spec is your machine?
[/EDITED]

[This message has been edited by Rog (edited 07-20-2003).][/b]

Originally posted by richardteller:
2x3G processors, 3G RAM

Not short of ooomph then

You can choose to create an uncompressed AVI stream, which will be lossless. It would be interesting to see exactly where the bottlenecks are in this situation.

May not be my business, but what’s the application for? Why the need for such a high frame rate

Originally posted by Rog:
May not be my business, but what’s the application for? Why the need for such a high frame rate
[/b]

Very strange client!! and

Originally posted by richardteller:
Very strange client!! and

Cool. How do get into interesting stuff like that? If you’re in the UK and need a hand, just let me know! I have plenty of years Delphi experience too…

BTW, I guess you don’t actually get to see all these images (unless you have a pretty fast refresh rate!) - don’t blink eh

That compressed texture-format is DXTC ("Direct X Texture Compression). It is possible to give a card data in that compressed format directly. There is a (new) file-format, *.dds files, which can store data compressed in that format.
However i think DXTC is not a lossless compression, but then there are different DXTC compression methods.
Search nVidias homepage, they have examples for this (and a Photoshop plugin for DDS files).

Jan.