Surface Memory access
From: Paul Gausden (Gausden_at_discussions.microsoft.com)
Date: 11/24/04
- Previous message: Rohan Parkes: "Re: Where to get VB.NET MDX files?"
- Next in thread: Phil Taylor: "Re: Surface Memory access"
- Reply: Phil Taylor: "Re: Surface Memory access"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 24 Nov 2004 09:41:07 -0800
I'm still dabbling with VB6/DX8.1 after many years.
I recently had a need to create a custom texture file format (for the Auran
Jet 3D engine) from TGA or 2 BMP files (texture+mask)
I managed this by loading textures and merging alpha channels etc using the
LockRect methods on a surface.
I then used loadsurfacefromsurface to create a mip mapped texture, the
surfaces then get exported in my file format, again using a D3DLOCKEDRECT
structure to get at the surface data.
This works fine for uncompressed formats.
The problem is working out the size and location of DXT compressed surfaces
in the texture. The pitch value for the lockedrect structure (back in the
days of DX6/7) used to reference the size of the whole DXT surface, but now
it seems to have a much smaller value?
It's a bit of a long shot as it's an obscure use, but does anyone know
anything about accessing these surfaces in memory and what the pitch
represents?
e.g. for a DXT1 surface, 64x64 pixels, I get a pitch value of 128
Thanks,
Paul
- Previous message: Rohan Parkes: "Re: Where to get VB.NET MDX files?"
- Next in thread: Phil Taylor: "Re: Surface Memory access"
- Reply: Phil Taylor: "Re: Surface Memory access"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|