示例#1
0
static inline void render_video(struct obs_core_video *video,
		bool raw_active, const bool gpu_active,
		int cur_texture, int prev_texture)
{
	gs_begin_scene();

	gs_enable_depth_test(false);
	gs_set_cull_mode(GS_NEITHER);

	render_main_texture(video, cur_texture);

	if (raw_active || gpu_active) {
		render_output_texture(video, cur_texture, prev_texture);

#ifdef _WIN32
		if (gpu_active) {
			gs_flush();
		}
#endif
	}

	if (raw_active || gpu_active) {
		if (video->gpu_conversion) {
			if (video->using_nv12_tex)
				render_convert_texture_nv12(video,
						cur_texture, prev_texture);
			else
				render_convert_texture(video,
						cur_texture, prev_texture);
		}

#ifdef _WIN32
		if (gpu_active) {
			gs_flush();
			output_gpu_encoders(video, raw_active, prev_texture);
		}
#endif
		if (raw_active)
			stage_output_texture(video, cur_texture, prev_texture);
	}

	gs_set_render_target(NULL, NULL);
	gs_enable_blending(true);

	gs_end_scene();
}
示例#2
0
static inline void render_video(struct obs_core_video *video, int cur_texture,
		int prev_texture)
{
	gs_begin_scene();

	gs_enable_depth_test(false);
	gs_set_cull_mode(GS_NEITHER);

	render_main_texture(video, cur_texture);
	render_output_texture(video, cur_texture, prev_texture);
	if (video->gpu_conversion)
		render_convert_texture(video, cur_texture, prev_texture);

	stage_output_texture(video, cur_texture, prev_texture);

	gs_set_render_target(NULL, NULL);
	gs_enable_blending(true);

	gs_end_scene();
}
示例#3
0
static inline void render_display_end()
{
	gs_end_scene();
	gs_present();
}