Fastest texture loader, biggest texture

Started by blue_tomato, September 25, 2005, 15:16:47

Previous topic - Next topic

blue_tomato

I am making a landscape rendering system which will require huge textures. Now, since most cards can only handle max 2048x2048 textures (or so I think, any overview of the texture capacity of todays cards?), I am implementing a system that can stream textures in as needed, when they are close to the camera's field of view.

Obviously this requires fast loading of the textures from disk, and also fast uploading of textures to the 3D card. Needless to say, the textures must use texture compression.

However, I found the texture loaders in LWJGL examples to be really slow:

1. It loads the image from disk in a format not directly compatible with the card
2. The image is decompressed
3. The image is recompressed by the cards drivers into the internal compressed format (or stored uncompressed - oh horror!).

1 and 2 is not needed, and I want to load the texture in a format directly compatible with the card. The format which seems most appropriate is DDS.

A plugin to save DDS files from Photoshop can be found here:

http://developer.nvidia.com/object/nv_texture_tools.html

My questions are:

1. Did anyone made such a loader for lwjg already?
2. Are there better approaches for superfast texture loading?

Thanks :)

spasi

Quote from: "blue_tomato"1. Did anyone made such a loader for lwjg already?

I believe DevIL has support for DDS. You could also write your own DDS loader (it's a simple format IIRC), or build a custom file format that contains pre-compressed texture data.

Quote from: "blue_tomato"2. Are there better approaches for superfast texture loading?

Sending pre-compressed data should be the fastest method.

Evil-Devil

To your question how to load DDS files, see this thread.
http://lwjgl.org/forum/viewtopic.php?t=1264
It has only basic dds support, no mipmaps etc, but that might come in future versions :) ATM I do a devIL implementation for my engine.