Reputation: 23485
On Windows in a .def file, I can hook functions like so:
glAccum = Hook_glAccum;
glActiveTextureARB = Hook_glActiveTextureARB;
glAlphaFunc = Hook_glAlphaFunc;
glAreTexturesResident = Hook_glAreTexturesResident;
glArrayElement = Hook_glArrayElement;
This way, all calls to glAccum
are redirected to Hook_glAccum
. All calls to glArrayElement
are redirected to Hook_glArrayElement
and so on..
I am not able to find the linux equivalent of a .def file or the equivalent of doing the above. Any ideas how I can achieve the same thing?
Upvotes: 1
Views: 448
Reputation: 1176
You can achieve the same result at run-time with LD_PRELOAD and weak symbols. Here are a few tutorials to demonstrate:
Understand Weak Symbols by Examples
Upvotes: 1