This project is a draft to test how create a library with GLFW OpenGL and apply over another binary bypassing glfwSwapBuffers and another functions.
Install devel version. In example for Fedora:
sudo dnf install glfw-devel.x86_64
Install freetype.
mkdir build && cd build
cmake ..
make -j4
make install
After compile and install (default path install inside build folder) go to install path an execute them:
This is a basic example for inyection:
./full
: If you want to see the expected result WITHOUT inyection code. This executable shows a simple OpenGL app../binary
: If you want to see the a simple OpenGL app. We will use this binary to overlay a library.LD_PRELOAD=./../lib/libsimpleoverlay.so ./binary
: This command will inyect shared librarylibsimpleoverlay.so
into raw binarybinary
. This combination shows how inyect a library to parse swapbuffers and keyboard into a GLFW app. to parse swapbuffers and keyboard into a GLFW app.
This is a simple implementation to show performance:
LD_PRELOAD=./../lib/libperformance_overlay.so ./fakeperformancegame
Original idea from ZaneA's gist