X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;ds=sidebyside;f=cinelerra-5.1%2Fcinelerra%2Fplayback3d.C;h=295ce6fe0a028816217b90f020572eb9a1f715b7;hb=3b4b6f588c4f2643316afcbc486ca6a35c16a431;hp=a7f185b51cdd7d8d3795183fb9c41c152997a5c9;hpb=aeec663c0a88a7ee81a820e758264050a7c4b37e;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/playback3d.C b/cinelerra-5.1/cinelerra/playback3d.C index a7f185b5..295ce6fe 100644 --- a/cinelerra-5.1/cinelerra/playback3d.C +++ b/cinelerra-5.1/cinelerra/playback3d.C @@ -521,12 +521,14 @@ void Playback3D::copy_from_sync(Playback3DCommand *command) // command->frame->get_w(), // command->frame->get_h(), // command->frame->get_color_model()); -// With NVidia at least, +#ifdef GLx4 +// With NVidia at least if(w % 4) { printf("Playback3D::copy_from_sync: w=%d not supported because it is not divisible by 4.\n", w); } else +#endif // Copy to texture if(command->want_texture) { @@ -726,7 +728,11 @@ void Playback3D::draw_output(Playback3DCommand *command, int flip_y) if(!command->is_cleared) { // If we get here, the virtual console was not used. - color_frame(command, 0,0,0,0); + int color = command->canvas->get_clear_color(); + int r = (color>>16) & 0xff; // always rgb + int g = (color>>8) & 0xff; + int b = (color>>0) & 0xff; + color_frame(command, r/255.f, g/255.f, b/255.f, 0.f); } // Texture @@ -800,11 +806,14 @@ void Playback3D::clear_output_sync(Playback3DCommand *command) // Using pbuffer for refresh frame. if( command->frame ) { command->frame->enable_opengl(); + command->frame->set_opengl_state(VFrame::SCREEN); color = command->frame->get_clear_color(); alpha = command->frame->get_clear_alpha(); int color_model = command->canvas->mwindow->edl->session->color_model; is_yuv = BC_CModels::is_yuv(color_model); } + else + color = command->canvas->get_clear_color(); int a = alpha; int r = (color>>16) & 0xff; int g = (color>>8) & 0xff;