Loading DDS from memory instead of file system

Hi, y’all.

I’m working with a project where the model texures are stored in a proprietary format that’s basically a header of metadata, followed by a .DDS of the actual texture.

I know I can do nodePath.LoadTexture() to load a .DDS file from the file system. Is there a way to hand Panda a handle to a block of data in memory and tell it to “load this as a .DDS”?

Yes:

if tex.read_dds(StringStream(data)):
    print("Success!")

Thanks a lot!

Just one more example how most questions can be answered by digging into the API documentation, I guess. :wink: