plugins: Update plugins to use default draw effect for Metal

This commit is contained in:
PatTheMav
2025-08-20 17:01:09 -04:00
committed by Ryan Foster
parent 966f086c96
commit 95ea65136f
4 changed files with 23 additions and 4 deletions
+6 -1
View File
@@ -34,7 +34,12 @@ static void *av_fast_capture_create(obs_data_t *settings, obs_source_t *source)
capture_info->isFastPath = true;
capture_info->settings = settings;
capture_info->source = source;
capture_info->effect = obs_get_base_effect(OBS_EFFECT_DEFAULT_RECT);
if (gs_get_device_type() == GS_DEVICE_OPENGL) {
capture_info->effect = obs_get_base_effect(OBS_EFFECT_DEFAULT_RECT);
} else {
capture_info->effect = obs_get_base_effect(OBS_EFFECT_DEFAULT);
}
capture_info->frameSize = CGRectZero;
if (!capture_info->effect) {
+6 -1
View File
@@ -255,7 +255,12 @@ static void *display_capture_create(obs_data_t *settings, obs_source_t *source)
dc->source = source;
dc->hide_cursor = !obs_data_get_bool(settings, "show_cursor");
dc->effect = obs_get_base_effect(OBS_EFFECT_DEFAULT_RECT);
if (gs_get_device_type() == GS_DEVICE_OPENGL) {
dc->effect = obs_get_base_effect(OBS_EFFECT_DEFAULT_RECT);
} else {
dc->effect = obs_get_base_effect(OBS_EFFECT_DEFAULT);
}
if (!dc->effect)
goto fail;
+6 -1
View File
@@ -291,7 +291,12 @@ API_AVAILABLE(macos(12.5)) static void *sck_video_capture_create(obs_data_t *set
sc->capture_delegate = [[ScreenCaptureDelegate alloc] init];
sc->capture_delegate.sc = sc;
sc->effect = obs_get_base_effect(OBS_EFFECT_DEFAULT_RECT);
if (gs_get_device_type() == GS_DEVICE_OPENGL) {
sc->effect = obs_get_base_effect(OBS_EFFECT_DEFAULT_RECT);
} else {
sc->effect = obs_get_base_effect(OBS_EFFECT_DEFAULT);
}
if (!sc->effect)
goto fail;
+5 -1
View File
@@ -314,7 +314,11 @@ static inline bool init_obs_graphics_objects(syphon_t s)
s->vertbuffer = create_vertbuffer();
obs_leave_graphics();
s->effect = obs_get_base_effect(OBS_EFFECT_DEFAULT_RECT);
if (gs_get_device_type() == GS_DEVICE_OPENGL) {
s->effect = obs_get_base_effect(OBS_EFFECT_DEFAULT_RECT);
} else {
s->effect = obs_get_base_effect(OBS_EFFECT_DEFAULT);
}
return s->sampler != NULL && s->vertbuffer != NULL && s->effect != NULL;
}