Skip to main content
gamedev.net
🔒 Locked

Texture creation question.

Started by Erik1234 1 reply 800+ views
Original Post
Erik1234
Erik1234
Hello, I wrote a hack for a game and I am trying to figure out how to hook the texture part of Direct3D9. This texture hook will work if and only if all textutures created in the game are created through m_pD3Dev->CreateTexture (where m_pD3Dev is the IDirect3DDevice9 device...). So, my question is, what happens if the game calls one of these functions: D3DXCreateTexture, D3DXCreateTextureFromFile, D3DXCreateTextureFromFileEx, D3DXCreateTextureFromFileInMemory, D3DXCreateTextureFromFileInMemoryEx, D3DXCreateTextureFromResource, or D3DXCreateTextureFromResourceEx? Will these functions in return call m_pD3Dev->CreateTexture or will they create the texture via some other method? If you know for certain you can save me lots of time trying to figure this out, thanks!
jollyjeffers
jollyjeffers
D3DX sits on top of D3D, so eventually the D3DX calls have to call into the D3D API.

Verify this yourself by running PIX for Windows with D3DPERF_BeginEvent() and D3DPERF_EndEvent() - you can see exactly what calls are made into the core API's.

hth
Jack
<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ |
Erik1234
Erik1234
Alright, thanks, knowing this really helps in making my hack. :)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.