0

I only get the first face in a cubemap. How do I access/load the other ones?

With DevIL 1.7.8 on Ubuntu Natty: I use ilLoad or ilLoadImage to load a dds-file with 6 textures, but only the first face gets loaded. ilGetInteger() give the results:

IL_IMAGE_DEPTH: 1

IL_IMAGE_BYTES_PER_PIXEL:4

IL_NUM_LAYERS: 0

IL_NUM_IMAGES: 0

IL_IMAGE_TYPE: 5121 (= 0x1401, not even an image type according to il.h! )

IL_IMAGE_CUBEFLAGS: 1024

IL_ACTIVE_IMAGE: 0

IL_IMAGE_SIZE_OF_DATA: 65536 (which is 128x128x4 and match the "image size in pixels" times "bytes per pixel".)

If I try to use ilActiveImage with a value other than 0, it returns false.

I have tried Earth.dds and LightCube.dds from the RenderMonkey example textures, as well as saved my own dds-file with GIMP, but only the first face gets loaded for all of them.

Does anyone have any suggestion? (I have compiled DevIL with ilu and ilut-support, if that would make any difference.)

Brian Cain
  • 14,403
  • 3
  • 50
  • 88
Deorbit
  • 293
  • 2
  • 11
  • Have you checked the documentation and/or source code? My guess would be that it's unlikely to be supported (people who want to load cube map DDS files usually want the unpacked data for direct uploading as texture data -- see e.g. [here](http://stackoverflow.com/questions/577125/dds-texture-loading)). – user786653 Sep 27 '11 at 18:22
  • @user786653: It could have been supported, as the point of DevIL is to load image formats and get at "the unpacked data for direct uploading as texture data". It has provisions for mipmaped images, but not for cubemaps. – Nicol Bolas Sep 27 '11 at 19:48

1 Answers1

2

DevIL does not have provisions for DDS Cubemaps. Neither do a surprising number of image loaders.

Nicol Bolas
  • 449,505
  • 63
  • 781
  • 982
  • Thanks! It was easy to be mislead since there were signs of support. So, should one choose another image format or another loader? It seems convenient to have the faces collected in one file. – Deorbit Sep 29 '11 at 07:41