- command->input->bind_texture(0);
- command->frame->enable_opengl();
- command->frame->init_screen();
- unsigned int shader = BC_CModels::is_yuv(command->input->get_color_model()) ?
- VFrame::make_shader(0, yuv_to_rgb_frag, 0) : 0;
- if( shader > 0 ) {
- glUseProgram(shader);
- int variable = glGetUniformLocation(shader, "tex");
- glUniform1i(variable, 0);
- BC_GL_YUV_TO_RGB(shader);
- }
- else
- glUseProgram(0);
- command->input->draw_texture(1);
- command->frame->screen_to_ram();
- glUseProgram(0);