开发者

Load a cubemap in a DDS file with DevIL

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 exam开发者_如何学Cple 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.)


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜