# MangoHud
A Vulkan and OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load and more.
![Example gif showing a standard performance readout with frametimes](assets/overlay_example.gif)
---
- [MangoHud](#mangohud)
- [Installation - Build From Source](#installation---build-from-source)
- [Dependencies](#dependencies)
- [Building with build script](#building-with-build-script)
- [Installation - Pre-packaged Binaries](#installation---pre-packaged-binaries)
- [GitHub releases](#github-releases)
- [Arch-based distributions](#arch-based-distributions)
- [Debian, Ubuntu](#debian-ubuntu)
- [Fedora](#fedora)
- [Solus](#solus)
- [openSUSE](#opensuse)
- [Flatpak](#flatpak)
- [Normal usage](#normal-usage)
- [OpenGL](#opengl)
- [Hud configuration](#hud-configuration)
- [Environment Variables: **`MANGOHUD_CONFIG`**, **`MANGOHUD_CONFIGFILE`**, and **`MANGOHUD_PRESETSFILE`**](#environment-variables)
- [Vsync](#vsync)
- [OpenGL Vsync](#opengl-vsync)
- [Vulkan Vsync](#vulkan-vsync)
- [Keybindings](#keybindings)
- [Workarounds](#workarounds)
- [FPS logging](#fps-logging)
- [Online visualization: FlightlessMango.com](#online-visualization-flightlessmangocom)
- [Local visualization: `mangoplot`](#local-visualization-mangoplot)
## Installation - Build From Source
---
If you wish to compile MangoHud to keep up to date with any changes - first clone this repository and cd into it:
```
git clone --recurse-submodules https://github.com/flightlessmango/MangoHud.git
cd MangoHud
```
Using `meson` to install "manually":
```
meson build
ninja -C build install
```
By default, meson should install MangoHud to `/usr/local`. Specify install prefix with `--prefix=/usr` if desired.
Add `-Dappend_libdir_mangohud=false` option to meson to not append `mangohud` to libdir if desired (e.g. /usr/local/lib/mangohud).
To install 32-bit build on 64-bit distro, specify proper `libdir`: `lib32` for Arch, `lib/i386-linux-gnu` on Debian-based distros. RPM-based distros usually install 32-bit libraries to `/usr/lib` and 64-bit to `/usr/lib64`.
You may have to change `PKG_CONFIG_PATH` to point to correct folders for your distro.
```
CC="gcc -m32" \
CXX="g++ -m32" \
PKG_CONFIG_PATH="/usr/lib32/pkgconfig:/usr/lib/i386-linux-gnu/pkgconfig:/usr/lib/pkgconfig" \
meson build32 --libdir lib32
ninja -C build32 install
```
### Dependencies
Install necessary development packages.
- gcc, g++
- or gcc-multilib, g++-multilib for 32-bit support
- meson >=0.54
- ninja (ninja-build)
- glslang
- libGL/libEGL (libglvnd, mesa-common-dev, mesa-libGL-devel etc)
- X11 (libx11-dev)
- XNVCtrl (libxnvctrl-dev), optional, use `-Dwith_xnvctrl=disabled` option with `meson` to disable
- D-Bus (libdbus-1-dev), optional, use `-Dwith_dbus=disabled` option with `meson` to disable
Python 3 libraries:
- Mako (python3-mako or install with `pip`)
If distro's packaged `meson` is too old and gives build errors, install newer version with `pip` (`python3-pip`).
### Building with build script
You can also use `build.sh` script to do some things automatically like install dependencies, if distro is supported but it usually assumes you are running on x86_64 architecture.
To just build it, execute:
```
./build.sh build
```
You can also pass arguments to meson:
```
./build.sh build -Dwith_xnvctrl=disabled
```
Resulting files will be install to `./build/release` folder.
If you have compiled MangoHud from source, to install it, execute:
```
./build.sh install
```
You can then subsequently uninstall MangoHud via the following command
```
./build.sh uninstall
```
To tar up the resulting binaries into a package and create a release tar with installer script, execute:
```
./build.sh package release
```
or combine the commands, although `package` should also call `build` if it doesn't find the built libs:
```
./build.sh build package release
```
If you have built MangoHud before and suddenly it fails, you can try cleaning the `build` folder, execute:
```
./build.sh clean
```
Currently it just does `rm -fr build` and clears subprojects.
__NOTE: If you are running an Ubuntu-based, Arch-based, Fedora-based, or openSUSE-based distro, the build script will automatically detect and prompt you to install missing build dependencies. If you run into any issues with this please report them!__
## Installation - Pre-packaged Binaries
---
### GitHub releases
If you do not wish to compile anything, simply download the file under [Releases](https://github.com/flightlessmango/MangoHud/releases), extract it, and from within the extracted folder in terminal, execute:
```
./mangohud-setup.sh install
```
### Arch-based distributions
If you are using an Arch-based distribution, install [`mangohud`](https://archlinux.org/packages/extra/x86_64/mangohud/) and [`lib32-mangohud`](https://archlinux.org/packages/multilib/x86_64/lib32-mangohud/) from the `extra`/`multilib` repository. [`mangohud-git`](https://aur.archlinux.org/packages/mangohud-git/) and [`lib32-mangohud-git`](https://aur.archlinux.org/packages/lib32-mangohud-git/) are available on the AUR to be installed via your favourite AUR helper. These can help fix issues with the hud not activating when using stable releases from pacman!
If you are building it by yourself, you need to enable multilib repository, by editing pacman config:
```
sudo nano /etc/pacman.conf
```
and uncomment:
```txt
#[multilib]
#Include = /etc/pacman.d/mirrorlist
```
then save the file and execute:
```
sudo pacman -Syy
```
### Debian, Ubuntu
If you are using Debian 11 (Bullseye) or later, Ubuntu 21.10 (Impish) or later, or distro derived from them, to install the [MangoHud](https://tracker.debian.org/pkg/mangohud) package, execute:
```
sudo apt install mangohud
```
Optionally, if you also need MangoHud for 32-bit applications, execute:
```
sudo apt install mangohud:i386
```
### Fedora
If you are using Fedora, to install the [MangoHud](https://src.fedoraproject.org/rpms/mangohud) package, execute:
```
sudo dnf install mangohud
```
### Solus
If you are using Solus, to install [MangoHud](https://dev.getsol.us/source/mangohud/) simply execute:
```
sudo eopkg it mangohud
```
### openSUSE
If you run openSUSE Leap or Tumbleweed you can get Mangohud from the official repositories.
There are two packages, [mangohud](https://software.opensuse.org/package/mangohud) for 64bit and [mangohud-32bit](https://software.opensuse.org/package/mangohud-32bit) for 32bit application support.
To have Mangohud working for both 32bit and 64bit applications you need to install both packages even on a 64bit operating system.
```
sudo zypper in mangohud mangohud-32bit
```
Leap doesn't seem to have the 32bit package.
Leap 15.2
```
sudo zypper addrepo -f https://download.opensuse.org/repositories/games:tools/openSUSE_Leap_15.2/games:tools.repo
sudo zypper install mangohud
```
Leap 15.3
```
sudo zypper addrepo -f https://download.opensuse.org/repositories/games:tools/openSUSE_Leap_15.3/games:tools.repo
sudo zypper install mangohud
```
### Flatpak
If you are using Flatpaks, you will have to add the [Flathub repository](https://flatpak.org/setup/) for your specific distribution, and then, to install it, execute:
For flatpak:
```
flatpak install org.freedesktop.Platform.VulkanLayer.MangoHud
```
To enable MangoHud for all Steam games:
```
flatpak override --user --env=MANGOHUD=1 com.valvesoftware.Steam
```
## Normal usage
---
To enable the MangoHud overlay layer for Vulkan and OpenGL, run :
`mangohud /path/to/app`
For Lutris games, go to the System options in Lutris (make sure that advanced options are enabled) and add this to the `Command prefix` setting:
`mangohud`
For Steam games, you can add this as a launch option:
`mangohud %command%`
Or alternatively, add `MANGOHUD=1` to your shell profile (Vulkan only).
## OpenGL
OpenGL games may also need `dlsym` hooking. Add `--dlsym` to your command like `mangohud --dlsym
没有合适的资源?快使用搜索试试~ 我知道了~
利用C语言制作一个Vulkan和OpenGL覆盖图,用于监控FPS、温度、CPUGPU负载等.zip
共180个文件
h:62个
cpp:50个
yml:8个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 138 浏览量
2024-02-22
12:35:08
上传
评论
收藏 14.27MB ZIP 举报
温馨提示
一个Vulkan和OpenGL覆盖图,用于监控FPS、温度、CPUGPU负载等
资源推荐
资源详情
资源评论
收起资源包目录
利用C语言制作一个Vulkan和OpenGL覆盖图,用于监控FPS、温度、CPUGPU负载等.zip (180个子文件)
mangohud.1 2KB
mangoapp.1 1KB
meson.build 8KB
meson.build 7KB
meson.build 1KB
meson.build 201B
glad.c 180KB
font_unispace.c 42KB
os_time.c 5KB
control.c 2KB
os_socket.c 2KB
setup.cfg 516B
MangoHud.conf 9KB
presets.conf 101B
vulkan.cpp 84KB
hud_elements.cpp 72KB
overlay.cpp 41KB
overlay_params.cpp 36KB
gl_renderer.cpp 32KB
kiero.cpp 27KB
cpu.cpp 22KB
dbus.cpp 15KB
main.cpp 15KB
elfhacks.cpp 14KB
amdgpu.cpp 10KB
logging.cpp 10KB
inject_glx.cpp 9KB
loader_dbus.cpp 9KB
loader_nvml.cpp 8KB
device.cpp 7KB
layer.cpp 7KB
gl_hud.cpp 7KB
battery.cpp 6KB
gpu.cpp 6KB
control.cpp 6KB
nvctrl.cpp 5KB
file_utils.cpp 5KB
font.cpp 5KB
memory.cpp 4KB
intel.cpp 4KB
loader_glx.cpp 4KB
inject_egl.cpp 4KB
config.cpp 3KB
keybinds.cpp 3KB
test_amdgpu.cpp 3KB
loader_nvctrl.cpp 3KB
nvml.cpp 3KB
real_dlsym.cpp 2KB
notify.cpp 2KB
loader_x11.cpp 2KB
blacklist.cpp 2KB
nvapi.cpp 2KB
pci_ids.cpp 2KB
msm.cpp 2KB
main.cpp 2KB
cpu_win32.cpp 2KB
dxgi.cpp 1KB
hook_dlsym.cpp 1KB
iostats.cpp 1KB
shared_x11.cpp 990B
d3d11_hook.cpp 878B
file_utils_win32.cpp 704B
d3d12_hook.cpp 681B
d3d_shared.cpp 622B
.editorconfig 611B
.editorconfig 34B
overlay.frag 265B
overlay_example.gif 9.07MB
log_upload_example.gif 4.69MB
.gitignore 542B
.gitmodules 104B
gpu_metrics 120B
gpu_metrics_apu 128B
gpu_metrics_invalid 151B
nvml.h 335KB
glad.h 281KB
forkawesome.h 221KB
filesystem.h 180KB
IconsForkAwesome.h 40KB
overlay_params.h 14KB
dbus_helpers.h 12KB
khrplatform.h 10KB
macros.h 10KB
amdgpu.h 9KB
vk_util.h 6KB
hud_elements.h 5KB
fps_metrics.h 5KB
elfhacks.h 5KB
c99_compat.h 5KB
cpu.h 5KB
overlay.h 4KB
dbus_info.h 4KB
os_time.h 3KB
string_utils.h 3KB
detect_os.h 2KB
gl_renderer.h 2KB
loader_dbus.h 2KB
winesync.h 2KB
fcat.h 2KB
no_extern_c.h 2KB
共 180 条
- 1
- 2
资源评论
mldxxxxll5
- 粉丝: 3567
- 资源: 877
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功