mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-24 10:14:13 -05:00
plugins: Update plugins to use default draw effect for Metal
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user