jackun
2f807a4c0d
Add `spdlog` wrap and logging
3 years ago
jackun
b6dab97d08
[OpenGL] Some code clean-ups
3 years ago
Lukáš Horáček
213953089d
Detect ToGL
3 years ago
Lukáš Horáček
f1eae93253
Use map_files instead of lsof for wined3d detection
3 years ago
jackun
750d2cddb5
Make engine type per instance
3 years ago
Alessandro Toia
570bef468b
Cosmetic changes to engine detection
3 years ago
FlightlessMango
5330573c8c
don't rely on std in engine detection
3 years ago
FlightlessMango
2e5fc31711
use vulkan to determine if zink
3 years ago
Alessandro Toia
d556e8e357
Improve Zink detection
3 years ago
jackun
765024227c
[OpenGL] Framerate limit in eglSwapBuffers
3 years ago
Alessandro Toia
ddfcb01c30
Add detection of Zink
3 years ago
jackun
0f6ead57d7
[OpenGL] Bind framebuffer for all GL ES versions
3 years ago
jackun
e62d6e3337
[OpenGL] Save/restore last GL_DRAW_FRAMEBUFFER if using `gl_bind_framebuffer`
3 years ago
jackun
afa50a17c4
[OpenGL] Add gl_size_query, gl_bind_framebuffer, gl_dont_flip options for workarounds
...
`gl_size_query = viewport` - specify what to use for getting display size. Options are "viewport", "scissorbox" or disabled. Defaults to using glXQueryDrawable.
`gl_bind_framebuffer = 0` - (re)bind given framebuffer before MangoHud gets drawn. Helps with Crusader Kings 3.
`gl_dont_flip = 1` - don't swap origin if using GL_UPPER_LEFT. Helps with Ryujinx.
3 years ago
jackun
30cdc912a8
Rework blending equation to preserve alpha in output buffer
...
bda12e5fdd
3 years ago
jackun
118c54072f
[OpenGL] Disable primitive restart
3 years ago
jackun
8e7564ab1a
[OpenGL] Disable stencil test
3 years ago
jackun
bdd87f5eff
Use SetTexID instead
3 years ago
jackun
76b571bc11
[OpenGL] Fix glClipControl(GL_UPPER_LEFT) rendering
3 years ago
jackun
3e77dd6e0b
[OpenGL] Add eglSwapBuffers to hook list
3 years ago
jackun
6769ae96fa
[OpenGL] Explicitly include dlfcn.h
3 years ago
jackun
41034b1089
[OpenGL] Return -1 instead for glXSwapBuffersMscOML if it is null
3 years ago
jackun
439ff716c2
[OpenGL] Some nullptr guards
...
Maybe helps issue #355
3 years ago
FlightlessMango
48cf66630b
Detect WineD3D
3 years ago
jackun
0fbbf00fe2
[OpenGL] Load libEGL.so.1 and use eglGetProcAddress to get EGL procs
3 years ago
Alessandro Toia
03bd71d145
Add missing add_blacklist for OpenGl apps
4 years ago
jackun
ee2933bff5
Resize fonts
4 years ago
jackun
1e8487c991
Move color conversion to HudElements; move some overlay related functions back to overlay.cpp
4 years ago
jackun
891a3944f3
[OpenGL] Default and limit GLSL version to 1.20 if OpenGL < 3.0. Not using anything fancy for now anyway.
4 years ago
jackun
60940e5a02
[OpenGL] Just "refcount" by glXCreate/DestroyContext calls; recreate "lost" objects
4 years ago
jackun
ba6346110c
[OpenGL] Enable color mask
...
Maybe previous state needs to be restored afterwards?
4 years ago
FlightlessMango
500fba7f6c
Fix for memory leak in source 1 games
4 years ago
jackun
443271f0b5
Convert hud color params to linear for sRGB image formats
4 years ago
larskraemer
a28931ef6b
General cleanup ( #272 )
...
* Cleanup unused struct fields, use uniform include guards
4 years ago
jackun
8eba5e2ed2
[OpenGL] Use GL_R8 for font textures
...
Randomly getting squares with GL_ALPHA for some reason
4 years ago
jackun
c63037efb5
Use 1-channel font textures; glyph ranges support; vulkan image descriptors and "helper" functions
...
* To save some memory, use just 1-channel alpha-only textures
* Add some sort of wider glyph ranges support
* Chop single-ish vulkan font image uploading function into separate reusable helper functions
* Use descriptor set for ImTextureID but probably use texture array and push constants for "fast-path" if need arises
4 years ago
jackun
62efa4acc4
[OpenGL] Simplify if check
4 years ago
jackun
d0999ab01b
[OpenGL] Workaround: Merge version and shader strings for Feral games
...
FIXME: GLAD loads Feral's version of glShaderSource,
4 years ago
jackun
2db83f4e18
[OpenGL] Check if font texture is valid and regenerate if not
4 years ago
Lars Krämer
20221217d4
Frame-timing using chrono
4 years ago
FlightlessMango
e957358786
Force a hw values update on log start
4 years ago
jackun
44060c2b80
Force blacklist re-check at certain points
...
Wine preloader that executed a non-blacklisted app may execute a blacklisted app,
or vice versa, and previous check applies to new app too.
4 years ago
jackun
c04658456a
Wider glyph ranges for custom font; media player text scaling with `font_scale_media_player` param
4 years ago
jackun
5ad67fe446
Remove unused vars
4 years ago
FlightlessMango
0e396186a6
[OpenGL] Always use QueryDrawable
4 years ago
FlightlessMango
75f9128ce5
Redesigned logging, adding quick benchmark
4 years ago
jackun
bb9721fe87
[OpenGL] Check if SRGB is enabled and Render ImGui in linear colorspace
4 years ago
FlightlessMango
1ddcc531ff
Get device name from pci.ids and display it
4 years ago
jackun
beee2b08c7
[OpenGL] Add glXSwapBuffersMscOML and disable XGetGeometry
4 years ago
jackun
29e5c4e460
Show device's name and vulkan driver version
4 years ago
jackun
d8264c485f
[OpenGL] Fixed version check mistakenly testing for GL 4.0+ instead of 3.2+ to enable ImGuiBackendFlags_RendererHasVtxOffset, leaving 3.2 contexts without it. (ocornut#3119, ocornut#2866, ocornut#2852)
4 years ago
jackun
22ee56def5
[OpenGL] Use 32bit font texture until someone figures out why 8-bit looks worse
4 years ago
jackun
0271aa6368
[OpenGL] Track threads with context, but might as well ignore glXMakeCurrent(NULL, NULL) calls probably
4 years ago
jackun
934dc31e44
Add utility lib with dlsym hooking
4 years ago
Sporif
d1e90b5bec
[OpenGL] Add blacklist functionality
4 years ago
jackun
bb4b78ada0
[OpenGL] Spam terminal a little less with version strings
4 years ago
jackun
f35e49defa
[OpenGL] Merge "shared" files back to imgui_hud.cpp
4 years ago
jackun
b40fb95a04
[OpenGL] Better version parsing and fix gl version checks for vertex arrays
4 years ago
jackun
e5a256bfc0
Move DBus init to overlay_params so it can be enabled/disabled on the fly from a single place
4 years ago
jackun
d81dc7936a
[OpenGL] Use glXQueryDrawable if XGetGeometry fails
4 years ago
jackun
ff3c58c9c5
[OpenGL] Change glXMakeCurrent return type to int just in case and convert missed #ifdefs
4 years ago
jackun
f3f04f3f78
Print dlerror() in lib loaders
4 years ago
jackun
780ea7c89b
[OpenGL] Use GLAD instead on gl3w and hook EGL
4 years ago
jackun
772ab6aa5b
[OpenGL] Don't exit if function is not found, it probably isn't catastrophic
4 years ago
jackun
8024736253
Add DBus loader, combined ticker for Spotify metadata
4 years ago
FlightlessMango
d975278396
Dbus with spotify
4 years ago
jackun
8cd3172335
[OpenGL] Separate GLX out from shareable code so wayland sessions can just use EGL, hopefully
4 years ago
jackun
bd9d9650a0
Move `dlsym` hook out from inject_glx.cpp
4 years ago
jackun
0a36578adf
[OpenGL] Rename GLX loader functions
4 years ago
jackun
b2e6727b25
[OpenGL] Rename loader_gl.* to loader_glx.*
4 years ago
jackun
2e7d92e068
Move `real_dlsym` files out from `gl` subdir
4 years ago
jackun
59113b3ae2
[OpenGL] Move ImGui functions to separate file
4 years ago
jackun
c3e50db2f4
[OpenGL] Import glXQueryDrawable just in case
4 years ago
jackun
accac3a015
[OpenGL] Import XGetGeometry
4 years ago
jackun
ebe23d3431
[OpenGL] Rename inject.cpp to inject_glx.cpp in preparation for separating X11 related functions
4 years ago
jackun
5afbe10005
[OpenGL] Restore ImGui's context to previously saved one, duh
4 years ago
jackun
6eb2c9bc09
[OpenGL] Explicitly set ImGui's context and treat global context as foreign
...
Apps might be using Dear ImGui so keep our stuff separate from theirs.
Issue #107
4 years ago
jackun
e72a7bdd76
[config] Try to set notifier file descriptor to non-blocking mode; add start/stop_notifier functions
...
If setting to non-blocking fails, just closing the fd should kill it anyway
4 years ago
jackun
053a07d83c
[OpenGL] Don't set display size to scissor box if its size is just 1 by 1
4 years ago
jackun
c7bee1a99d
[OpenGL] Compare if viewport or scissor box size changed with window resizing and use that for display size
4 years ago
jackun
6ad6bffade
Use ImGui's DisplaySize so display size for layer positioning etc can be set the same way for vulkan and OpenGL
4 years ago
jackun
8aa0783b4a
Show vulkan/opengl version
...
OpenGL glGetIntegerv(GL_[MAJOR|MINOR]_VERSION) don't work on versions < 3.0 though
4 years ago
jackun
bb3aba9080
[OpenGL] Use elfhacks to load real OpenGL functions
4 years ago
jackun
5bdfcd493d
[config] Add config file change notifier to OpenGL
4 years ago
FlightlessMango
c5dad16612
Listen for modify on config file
4 years ago
FlightlessMango
b0e1fe9321
[params] set targetFrameTime in params.cpp
4 years ago
jackun
abef561573
Disable CPU stat(s) if it failed to initialize
4 years ago
FlightlessMango
b3286cbe48
check if opengl/vulkan with is_vulkan bool
4 years ago
jackun
c850507314
[OpenGL] Initialize MangoHud from glXSwapBuffers even if glXMakeCurrent is skipped for some reason
4 years ago
jackun
125dbc1403
[OpenGL] Allow swap interval of -1 for adaptive sync, if supported
4 years ago
FlightlessMango
b4cd837328
[OpenGL] custom font file
4 years ago
jackun
31a651133c
[OpenGL] Cleanup stderr output a little
4 years ago
jackun
bbfad2e073
[OpenGL] Parse and initialize configuration just once
4 years ago
jackun
a52dce875f
[OpenGL] Keep glClipControl local to imgui_impl_opengl3.cpp
4 years ago
jackun
05d61ee77e
Init CPUStats just once
4 years ago
jackun
5caeb10882
[OpenGL] Apply swap interval from glXMakeCurrent
4 years ago
jackun
297b44bfe6
[OpenGL] Force-load libGL.so.1 with dlopen() if dlsym fails to find functions
4 years ago
jackun
e0ce0493f7
[OpenGL] Set swap interval (vsync) with `gl_vsync` param
4 years ago
jackun
37e34335ae
Sprinkle NDEBUG over gl debug prints
4 years ago
jackun
ad598f7ec4
[OpenGL] Fix double-free with ImGui context
4 years ago