Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

nPawn

D3DXLoadSurfaceFromFile

This topic is 6305 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

anyone successfully used this function to load a .bmp (or other picture file) onto a DX8 surface? I tried this chunk of code, but it fails with D3DERR_INVALIDCALL: HRESULT hr; LPDIRECT3DSURFACE8 pSurf = NULL; D3DXIMAGE_INFO d3dii; hr = D3DXLoadSurfaceFromFile(pSurf, NULL, NULL, fileName, NULL, D3DX_DEFAULT, 0, &d3dii); the variables are all good except I suspect I need to do something with pSurf first, because i get this error in the output window while debugging: D3DX: pDestSurface pointer is invalid I dug through the DX8 examples, but very few use D3DXLoadSurfaceFromFile, and how they allocate pSurf is difficult to pinpoint to say the least. Any ideas what i''m doing wrong?

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!