-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
apitrace
apitrace is a tool used for OpenGL debugging.
Install apitraceusing default package manager:
sudo apt install apitrace
Download the precompiled apitrace build from https://people.freedesktop.org/~jrfonseca/apitrace/apitrace-msvc-latest.7z and extract it in your software
folder.
Then, add the following line to the end of your PATH in your .bash_profile
:
~/software/apitrace-msvc/x64/bin
Now you can launch apitrace
with apitrace.exe
and the gui with qapitrace.exe
.
Install Qt5 as documented here: https://github.com/omichel/webots/wiki/Qt-compilation (note, you can skip QtWebKit and only install the macOS Qt component in the installer).
Then:
cd ~/software
git clone git://github.com/apitrace/apitrace.git
cd apitrace
mkdir build
cd build
cmake .. -DCMAKE_PREFIX_PATH=~/Qt5.11.2/5.11.2/clang_64/
make
echo '[Paths]
Prefix = /Users/[your username]/Qt5.11.2/5.11.2/clang_64' > qt.conf
Run:
export QT_QPA_PLATFORMTHEME=qt5ct # On Mojave, forcing the Qt light theme.
export VENDOR=AMD # On MacBook Pro 2018, select the right GPU.
qapitrace ....
Generate a trace like this: apitrace trace [Webots executable]
Then open the Trace in the GUI to view results for each call, or each frame etc.
Note: in the preferences you can choose to only display draw events, this is very helpful to cut through extraneous OpenGL calls while debugging.