View Full Version : D3DXCreateTextureFromFileInMemory

29-11-2005, 02:15 AM
Hello again!!

I'm using Clootie's headers, and want to call D3DXCreateTextureFromFileInMemory. It seems not to be in the headers, do I have to define it myself? If so, how can I do it, any code?

As always, thanks for your help. Best Regards!

29-11-2005, 02:25 AM
It is declared at line 8916 in D3DX9.pas.

29-11-2005, 02:39 AM
Hey, thanks...

04-12-2005, 01:33 AM
Hi, i am also interested in this feature.
Do you have any idea what I should 'fill in':D in this parameter:

[in] Pointer to the file in memory from which to create the texture.

? is this a pointer to a resource file?


04-12-2005, 02:50 AM
Yes, pSrcData is a pointer to the data loaded from the texture file. What you do is opening the file, i.e. with a TFileStream object, and you get the size of the file. Then allocate memory using GetMem for the whole file, and load the full file in that space. Finally you pass the pointer to the allocated memory to that function.

04-12-2005, 04:55 PM
Thanks! :D