Hi guys
I have run into a bit of a problem where my attempts to load a Offscreen Plain surface from a resource are always met with a result of D3DXERR_INVALIDDATA.
The actual file format is png, the resource type in the RC file is RT_RCDATA, and the surface is created using CreateOffscreenPlainSurface using D3DFMT_A8R8G8B8 and D3DPOOL_DEFAULT.
Here is one of my D3DXLoadSurfaceFromResource functions:
hr = D3DXLoadSurfaceFromResource(mvnl->mTop, NULL, NULL,
modinst, MAKEINTRESOURCE(400), NULL, D3DX_DEFAULT, D3DCOLOR_ARGB(255,0,0,0),
&dii);
I have made sure that the surface pointer is not NULL, and the module instance is also not NULL. Im starting to wonder if there is not possibly a incompatibility with PNG files and LoadSurfaceFromResource. Or would it be a case of PNG files not being 32bitARGB?
Thanks
JB