开发者

ID3DXFont::DrawText modifying the IDirect3DDevice9 vtable

开发者 https://www.devze.com 2023-03-28 03:43 出处:网络
I am mess开发者_运维问答ing around with Direct3D - modifying vtable entries for a device object so that my functions get called instead the provided ones. I noticed that despite this mostly working, a

I am mess开发者_运维问答ing around with Direct3D - modifying vtable entries for a device object so that my functions get called instead the provided ones. I noticed that despite this mostly working, at points something restores the IDirect3DDevice9 vtable, for example ID3DXFont::DrawText - the very first call; ulterior ones don't touch it.

Why does this happen?


Modifying vtables is pretty much undefined behavior. Maybe there are caches or different copies of the vtable. It's all implementation dependent. You're lucky it works at all!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号