(API Change) Fix filter rendering design flaw
obs_source_process_filter tried to do everything in a single function, but the problem is that effect parameters would not properly be accounted for due to the way it internally draws, therefore it was necessary to split the functions in to two, you first call obs_source_process_filter_begin, then you set your effect parameters, then you finally call obs_source_process_filter_end. This ensures that when the filter is drawn, that the effect parameters are set.
This commit is contained in:
@@ -50,8 +50,10 @@ static void *filter_create(obs_data_t *settings, obs_source_t *source)
|
||||
static void filter_render(void *data, gs_effect_t *effect)
|
||||
{
|
||||
struct test_filter *tf = data;
|
||||
obs_source_process_filter(tf->source, tf->whatever, 0, 0, GS_RGBA,
|
||||
|
||||
obs_source_process_filter_begin(tf->source, GS_RGBA,
|
||||
OBS_ALLOW_DIRECT_RENDERING);
|
||||
obs_source_process_filter_end(tf->source, tf->whatever, 0, 0);
|
||||
|
||||
UNUSED_PARAMETER(effect);
|
||||
}
|
||||
|
Reference in New Issue
Block a user