Results 1 to 6 of 6

Thread: D3DXCreateTextureFromFileInMemory

  1. #1

    D3DXCreateTextureFromFileInMemory

    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!
    -Marco

  2. #2

    D3DXCreateTextureFromFileInMemory

    It is declared at line 8916 in D3DX9.pas.

  3. #3

    D3DXCreateTextureFromFileInMemory

    Hey, thanks...

  4. #4

    D3DXCreateTextureFromFileInMemory

    Hi, i am also interested in this feature.
    Do you have any idea what I should 'fill in' in this parameter:

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

    ? is this a pointer to a resource file?

    Thanks!
    Marmin^.Style

  5. #5

    D3DXCreateTextureFromFileInMemory

    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.

  6. #6

    D3DXCreateTextureFromFileInMemory

    Thanks!
    Marmin^.Style

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •