VBGamer |
|||||||||||||||||||||||||||||||||||||||||||||||||||||
weird MetalWarrior (2 replies, 0 views) (2000-Dec-2) Okay... this is weird. Here's the line of code I'm using:
D3DX.LoadSurfaceFromMemory ucSurf, ByVal 0&, iRect, bytes(0), D3DFMT_DXT5, lPitch, ByVal 0&, iRect, 0, 0
What I'm trying to do is load a .dds file with DX8. lPitch is loaded from the file, ucSurf is a surface obtained with GetSurfaceLevel on a texture I've created of my pre-defined size. (256x256) The format of the texture is A4R4G4B4, the dds file is DXT5. I've already checked, and A4R4G4B4 enumerates just fine. I also tried testing this on a surface created with CreateImageSurface, and got the same results. I know the problem is in this Load call.
Now here's the weird part. Notice that for the Filter variable, I pass 0. After I read your post, I decided to try switching that to D3DX_FILTER_NONE, just for the heck of it, even tho they're supposed to be identical.
With 0, I get an automation error and can debug as normal.
With D3DX_FILTER_NONE, VB crashes without displaying any error. It simply shuts down VB when I run my program.
Is this my problem? An incorrect Filter argument? This isn't making much sense to me.
Thanks for all the help so far. :)
|