is there a directx equal for glTexSubImage2D
Hi,
have a function that returns me a array of const unsigned char's which i need to use to convert into a texture. OpenGL has a function called as glTexSubImage2D that can use the char's. Is there a directx function that does something like this? and any example of such the directx function will also be realllly helpful.
regards
Abhishek
D3DXLoadSurfaceFromMemory will do what you want. You'll have to create your texture first (Using IDirect3DDevice9::CreateTexture(), then get surface level 0 (With IDirect3DTexture9::GetSurfaceLevel()), then call D3DXLoadSurfaceFromMemory() to fill the surface, and finally release the surface.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement