Looking for a *.dds texture loading library in C++ that isn't specific to any Rendering API

Started by
9 comments, last by snake5 8 years ago

Hey guys, from time to time Im looking for a *.dds texture loading library in C++ that isn't specific to any Rendering API, as I have both OpenGL and D3D API supported (and planning to do a little ray-tracing as a toy).

So do you know a library that does that thing?

Advertisement
I can post the source to my DXT tool when I get home.
http://lspiroengine.com/?p=599


L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

WIC supports DDS files as well: https://msdn.microsoft.com/en-us/library/windows/desktop/ee719654(v=vs.85).aspx


WIC supports DDS

Yeah but it's not 'multiplaform'.


I can post the source to my DXT tool when I get home.

<A greedy emoticon>

I am home. Need to eat, watch the news, and then I will make a small package taking just the related and cross-platform code for the task.


L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

If you only need minimal parsing (to map byte offsets to cubemap sides/mipmaps for some common color formats), this might help:

https://github.com/snake5/sgs-sdl/blob/master/src/dds.h

https://github.com/snake5/sgs-sdl/blob/master/src/dds.c

Usage example: https://github.com/snake5/sgs-sdl/blob/master/src/ss3d_engine.c#L745

What I am putting together will only do the basic loading and give you the chunks you would send to the hardware.
It will not parse the blocks into RGB images, imoogiBG.

If this is enough, you should use the above library, as it seems more fleshed out than what I am making right now.


L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid


What I am putting together will only do the basic loading and give you the chunks you would send to the hardware.

This is exactley what i want.


What I am putting together will only do the basic loading and give you the chunks you would send to the hardware.
This is exactley what i want.

The the above library looks more complete, except that it doesn’t handle mipmaps (it appears to just load them as part of a big chunk, whereas mine separates them into separate memory blocks).
But I think you don’t need mipmaps, do you?


L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

DDS is such a simple format that i'm not even sure that it needs a library. There's no parsing/etc involved, it's just a simple header followed by data which can be directly consumed by the API without conversion.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

This topic is closed to new replies.

Advertisement