parent
71bd5860ce
commit
e08ad9faf3
|
@ -589,11 +589,13 @@ void OBSBasicFilters::DrawPreview(void *data, uint32_t cx, uint32_t cy)
|
|||
|
||||
gs_viewport_push();
|
||||
gs_projection_push();
|
||||
const bool previous = gs_set_linear_srgb(true);
|
||||
|
||||
gs_ortho(0.0f, float(sourceCX), 0.0f, float(sourceCY), -100.0f, 100.0f);
|
||||
gs_set_viewport(x, y, newCX, newCY);
|
||||
|
||||
obs_source_video_render(window->source);
|
||||
|
||||
gs_set_linear_srgb(previous);
|
||||
gs_projection_pop();
|
||||
gs_viewport_pop();
|
||||
}
|
||||
|
|
|
@ -148,10 +148,13 @@ void OBSBasicInteraction::DrawPreview(void *data, uint32_t cx, uint32_t cy)
|
|||
|
||||
gs_viewport_push();
|
||||
gs_projection_push();
|
||||
const bool previous = gs_set_linear_srgb(true);
|
||||
|
||||
gs_ortho(0.0f, float(sourceCX), 0.0f, float(sourceCY), -100.0f, 100.0f);
|
||||
gs_set_viewport(x, y, newCX, newCY);
|
||||
obs_source_video_render(window->source);
|
||||
|
||||
gs_set_linear_srgb(previous);
|
||||
gs_projection_pop();
|
||||
gs_viewport_pop();
|
||||
}
|
||||
|
|
|
@ -392,11 +392,13 @@ void OBSBasicProperties::DrawPreview(void *data, uint32_t cx, uint32_t cy)
|
|||
|
||||
gs_viewport_push();
|
||||
gs_projection_push();
|
||||
const bool previous = gs_set_linear_srgb(true);
|
||||
|
||||
gs_ortho(0.0f, float(sourceCX), 0.0f, float(sourceCY), -100.0f, 100.0f);
|
||||
gs_set_viewport(x, y, newCX, newCY);
|
||||
|
||||
obs_source_video_render(window->source);
|
||||
|
||||
gs_set_linear_srgb(previous);
|
||||
gs_projection_pop();
|
||||
gs_viewport_pop();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue