Archived

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

PLEASE HELP ME LOAD TEXTURES

This topic is 5131 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

Ok, im completely new to direct 3d, but i want to load a surface from a file, so i have a tutorial, well actually its a book, "the zen of Direct 3d game programming" and anyways, its a direct x 8 tutorial, and i have the direct x 9 sdk, i realize that the same include files are there as well, but id rather do direct 3d 9. so heres the problem, most of the stuff so far has been identical, dx9 and dx8, a few things, but i was able to figure out what it was supposed to be, but the pDevice->CreateImageSurface(arguements) had NO apparent counterparts in dx9, i found a few but they had some sharing handle stuff which i know nothing about, anyone know what i SHOULD be doing? thanks. -Dan

Share this post


Link to post
Share on other sites
After you load it into a texture with D3DXCreateTextureFromFile, you can access the underlying surface using GetSurfaceLevel (returns a IDirect3DSurface8*). You could then copy from that surface to another using CopyRects. Or, you could lock the texture, and access the data directly in the texture.

Share this post


Link to post
Share on other sites