Commit Graph

14 Commits (master)

Author SHA1 Message Date
jpark37 4fe6803fe4 libobs: Prevent D3D11 projectors from tearing
Some users stream projectors, so don't let them tear. Use the waitable
object to check the flip queue, and only flip if there's space.

Metal and Vulkan can probably perform similar flip throttling once OBS
starts using them.
2022-08-06 16:16:20 -07:00
tytan652 057e433bdb libobs-opengl: Replace OBS_UNUSED with UNUSED_PARAMETER
OBS_UNUSED is not portable to MSVC.
2022-07-20 08:22:08 +02:00
Norihiro Kamae af3890a4a9 libobs: Cleanup unused-parameters
- Add OBS_UNUSED to unused function parameters
- Remove unnecessary UNUSED_PARAMETER
Also update libobs-opengl/
2022-07-19 11:01:00 -04:00
Georges Basile Stavracas Neto ca2d02c2ce Drop GLX renderer
"They must often change, who would be constant in happiness or wisdom"

 - Confucius
2022-05-24 14:31:48 -03:00
Kurt Kartaltepe d78b27961c libobs-opengl: Add create_texture_from_pixmap for EGL
create_texture_from_pixmap is only implemented for X11/EGL where it will
bind the provided X11 pixmap to a texture with glEGLImageTargetTexture2DOES
2022-05-15 09:08:53 -03:00
jpark37 eccde48926 libobs/graphics: Add gs_is_monitor_hdr
Only Windows is implemented for now. Mac/Linux return false for now.
2022-03-23 22:35:26 -07:00
columbarius 4cda05f270 libobs/graphics: Add Linux-only gs_query_dmabuf_* functions
When sharing DMA-BUFs it is required the announce the underlying
hardware capabilities via supported modifiers.

Add new device_query_dmabuf_capabilities vfunc to gs_exports and connect it
to the egl implementation stubs in the supported render platforms. Add a new
public method gs_query_dmabuf_capabilities() that calls the vfunc above.

Add new device_query_dmabuf_modifiers vfunc to gs_exports and connect it
to the egl implementation in the supported render platforms. Add a new
public method gs_query_dmabuf_modifiers() that calls the vfunc above.
2021-12-22 14:27:53 -03:00
Kurt Kartaltepe 705a47b0e4 libobs, libobs-opengl: add drm format param
This adds the drmbuf format as a parameter separate from the obs texture
format that will be used. drmbuf's may have a variety of formats that we
need to pass correctly to get a usable texture which may correspond to
multi-platform texture formats.
2021-03-29 17:00:31 -03:00
Georges Basile Stavracas Neto f7a55f45fd libobs/graphics: Add Linux-only gs_texture_create_from_dmabuf()
DMA-BUF is a widespread Linux buffer sharing mechanism. It is what's
commonly used zero-copy screen sharing by Wayland compositors.

Add a new 'device_texture_create_from_dmabuf' vfunc to gs_exports,
and stub implementations to libobs-opengl. Add a new public method
gs_texture_create_from_dmabuf() that calls this vfunc.
2021-02-13 19:13:54 -03:00
Georges Basile Stavracas Neto eab27571d2 libobs-opengl: Introduce an EGL/Wayland renderer
Introduce a new Wayland/EGL renderer.
2021-02-09 09:39:17 -03:00
Georges Basile Stavracas Neto 2b3cb54771 libobs: Add a Wayland platform
Introduce the OBS_NIX_PLATFORM_WAYLAND enum value, and try to detect
it when OBS Studio runs by looking into the platform name.
2021-02-09 09:39:04 -03:00
Georges Basile Stavracas Neto 27d0182fdb UI: Set the Unix platform on startup
Move the OBS_USE_EGL environment variable check to obs-app.cpp,
and set the OBS platform to be either OBS_NIX_PLATFORM_X11_GLX
or OBS_NIX_PLATFORM_X11_EGL.
2021-02-01 19:05:11 -03:00
Georges Basile Stavracas Neto 2fd8a6df55 libobs-opengl: Introduce the X11/EGL winsys
Introduce the EGL/X11 winsys, and use it when the OBS_USE_EGL environment
variable is defined. This variable is only temporary, for future commits
will add a proper concept of platform.

All the EGL/X11 code is authored by Ivan Avdeev <me@w23.ru>.
2021-02-01 19:03:14 -03:00
Georges Basile Stavracas Neto 647415ec4f libobs-opengl: Factor out GLX winsys
Move the GLX-related code to gl-x11-glx, and introduce gl-nix as
a winsys-agnostic abstraction layer. gl-nix serves as the runtime
selector of which winsys going to be used. Only the X11/GLX winsys
is available now, but later commits will introduce the X11/EGL
winsys as well.

The gl-nix code was originally written by Jason Francis <cycl0ps@tuta.io>
2021-02-01 19:03:14 -03:00