Sign in to follow this  
Tispe

[DX9] Loading assets from memory

Recommended Posts

Hello good folk

I wish to load assets from a game that I bought years ago. The game uses a costum file format which bundles textures (DDS) and mesh data in to one file.
I managed to extract the DDS and compare the DDS file to the costom file using a hex editor. The DDS image is found inside the asset file with no deviations.

I load the asset file using Overlapped I/O to memory. How do I proceed in allocating ([b]D3DXLoadTextureFromMemory[/b], [b]D3DXLoadMeshFromMemory[/b]) these to:
LPD3DXMESH mesh;
D3DMATERIAL9* material;
LPDIRECT3DTEXTURE9* texture;
DWORD numMaterials;

Such that I can draw it?

EDIT: The header of the DDS is different.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this