Hi,there is a texture loader for DDS in C++ for Openb3dmax, I've been planning on writing a loader for Blitzmax so we can have DDS texture streams, but I might as well write a pixmap loader module and then it can be used for images too.I already have a STB Image pixmap factory loader module which supports TGA, PNG (32-bit only), BMP (no RLE), JPG (no progressive), also: GIF, PSD, HDR, PIC. The BRL JPG and PNG loaders are the best but Openb3dmax STBI TGA and BMP loaders are more stable. Brucey has an STBI loader module in NG but his version crashes on most TGAs, it seems when STBI got a rewrite TGAs were broken so Openb3dmax uses the older v1.35.
Hi Yellownakji, thanks for this, yes I now see the advantages you are talking about: first compressed textures in VRAM save memory, second compressed textures also improve GPU performance, third pre-processed mipmaps save loading times.The DDS loader I'm working on uses glCompressedTexImage2D which it seems does create a compressed texture in VRAM, the code will also loads mipmaps from file. I have just finished getting the loader working along with a LoadImageDDS function but haven't added these optimizations yet as I've only just realized what they are for. I'll update the code to do this where it's possible.
Well I've an update out for this but it's really just for compressed textures, I spent a lot of time getting anim textures working, this was then applied to cubic environment maps, and also LoadAnimImageDDS but images are not compressed as Max2D doesn't support it, so I will have to modify brl.glmax2d which doesn't look like it requires much work. I won't be able to mod brl.d3d9max2d though as I don't know much about Direct3D.
Okay, this is probably a final update on this, I have forked brl.mod NG which has the dds tweak for versions 0.87, 0.93, 0.99 and 0.105.Changes to Openb3dmax are (in no particular order) - independent module, so you only need to import ddsloader now; fixed random crash in GL 2.0 due to memfree (fix is check width/height>0); load dds from cpp library - full support for anim textures and my any-order cubic environment map. I haven't managed to load textures without mipmaps, but I may have another go at that later.
Well the ddsloader now has the option of no mipmaps, but for some reason mipmapped images break in GL2.0 (and probably lower) I tried fixing it but it seems too buggy, basically images are broken by what was loaded before them and if a mipmap fails the whole texture does too. Saying as non-mipmaps work perfectly and this is probably all people will want for 2d I've given up trying to fix it.