Commit Graph

10 Commits (master)

Author SHA1 Message Date
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
Kurt Kartaltepe 4163940137 libobs-opengl: Change log level for texture_from_pixmap
This function is expected to fail fairly often as it is the tool for
checking if windows are mapped and have a valid pixmap in the linux
capture plugin. So reduce this error to a debug message to avoid
spamming release builds.
2022-07-10 11:24:40 +10: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
Kurt Kartaltepe f695b14edc libobs-opengl: Use gl helpers in create_dmabuf_image
This replaces direct OpenGL calls to error handling helpers. Previously
this would cause errors to be misattributed to the next OpenGL functions
called.

Fixes DMA-BUF importing returning a texture on failure on KDE+NVIDIA.
2022-04-11 23:18:00 -03:00
Georges Basile Stavracas Neto e1f01554f7 libobs-opengl: Swap order of out parameters
The usual pattern of function signature is "array / n_elements",
but query_dmabuf_formats() does not follow it. Apply this order
to query_dmabuf_formats().
2021-12-30 18:41:04 -03:00
Georges Basile Stavracas Neto efb3220494 libobs-opengl: Remove unused function argument
The 'display' variable is unused, and the function is static,
so we don't need to carry the parameter.
2021-12-30 18:41:04 -03:00
columbarius b072159703 libobs-opengl: Implement DMA-BUF query functions for EGL renderer
Implement device_query_dmabuf_capabilities and
device_query_dmabuf_modifiers for EGL/Wayland and EGL/X11.
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 7867d16e6b libobs-opengl: Implement DMA-BUF importing on EGL renderers
Implement device_texture_create_from_dmabuf for EGL/X11 and EGL/Wayland.
The code is shared between them, in a new gl-egl-common.c file.

This is currently limited to a few common RGB(A) formats for now, which
seems to cover most use cases.
2021-02-13 19:48:56 -03:00