Compressed DDS texture support (rev3232)

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
Post Reply
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Compressed DDS texture support (rev3232)

Post by Nadro »

Hi,

I added compressed texture support to Irrlicht. Code was writed quickly, so it hasn't got many features and it is good only for primary texture operations - load texture and show it (scaling, mixing and other modification of loaded texture isn't support). DDS texture reader is base on loader from IrrSpintz. It doesn't support mipmaps saved in dds file, so only mipmaps generated in engine are usage. This code it's enough for usage compressed textures in games, but it isn't good as native part of Irrlicht engine, because it need many imprevments. This is very good temporary solution, so to time when we will get native support of compressed texture in Irrlicht.

Supported dds formats:
DXT1, DXT2, DXT3, DXT4, DXT5, A8R8G8B8

Before compilation You have to add CImageLoaderDDS.h and CImageLoaderDDS.cpp to Irrlicht project. You also have to disable D3D8 support.

You can download patch from (it's compatible with rev 3232 and support OpenGL and Direct3D9 modes):
http://nadro.net46.net/Patches/irrlicht ... port.patch
Last edited by Nadro on Mon Mar 01, 2010 12:10 am, edited 4 times in total.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

I was just thinking I need this, very good timing! Will report back with comments.

I am surprised to find OpenGL support with extensions too, nicely done.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Post by shadowslair »

This is cool. Hopefully it will be extended and improved and why not be implemented in the next Irrlicht versions? But indeed that`s a good beginning, really. :)
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
Jiang
Posts: 77
Joined: Tue Feb 20, 2007 11:03 am

Re: Compressed DDS texture support (rev2402)

Post by Jiang »

Nadro wrote:Hi,

Supported dds formats:
DXT1, DXT2, DXT3, DXT4, DXT5, A8R8G8B8
BTW, though currently X8R8G8B8 format is not supported by the above patch, it is easy to convert it to A8R8G8B8 format using DirectX SDK's "DirectX texture tool".

Thanks for the patch.

Regards,

Jiang
Reiko
Posts: 105
Joined: Sun Aug 16, 2009 7:06 am
Location: Australia

Post by Reiko »

Im having some problems with this :(

For loading uncompressed dds files, it works great.

For compressed ones (in my case my .dds are DXT1) it doesnt seem to work. The node is shown as white as if no texture were applied. But no error is shown in the console either. It does say "DDS : ECF_DXT1 format" when loading it though.

I'm using OpenGL if it matters (don't have the directx sdk installed so I can't compile the dll with it) and I'm using rev 2778 of Irrlicht.

Any suggestions?
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Post by Nadro »

Model of Your GFX card? Maybe Your graphic card doesn't support this extensions.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Reiko
Posts: 105
Joined: Sun Aug 16, 2009 7:06 am
Location: Australia

Post by Reiko »

Hmm, it's a nvidia geforce 8500GT

Any reason why it would work for uncompressed but not for compressed though?

Maybe I should download the directx sdk and try to see if its only opengl that has the issue.

Could be my computer though. I will try it on my other one tomorrow to be sure.


Edit: Guess its my comp, I sent it to a friend and its working fine on his lol. Well atleast I know the problem is me, guess I'll reinstall my driver or something. Thanks for the response though dude.
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post by Halifax »

Yeah, Reiko, it's probably just your drivers. The GeFroce 8500 GT is a DirectX 10 GPU so it has support for compressed textures, but the extensions for OpenGL are not exposed in your current drivers.

Make sure to come back and update us with your progress.
TheQuestion = 2B || !2B
Noiecity
Posts: 163
Joined: Wed Aug 23, 2023 7:22 pm
Contact:

Re: Compressed DDS texture support (rev3232)

Post by Noiecity »

thanks
**
If you are looking for people with whom to develop your game, even to try functionalities, I can help you, free. CC0 man.

Image
**
Post Reply