version update, Features5 update, proxy tweak
[goodguy/history.git] / cinelerra-5.1 / guicast / vframe3d.C
index 35f1ac69d9b1766955dd1eabe8b0df35a59d834c..65d9d5ce7485e29b0c0b996cc0bc1093331e3d6a 100644 (file)
@@ -151,8 +151,8 @@ void VFrame::to_texture()
 
 void VFrame::create_pbuffer()
 {
-       if(pbuffer &&
-               pbuffer->window_id != BC_WindowBase::get_synchronous()->current_window->get_id())
+       if( pbuffer && (pbuffer->w != get_w() || pbuffer->h != get_h() ||
+               pbuffer->window_id != BC_WindowBase::get_synchronous()->current_window->get_id() ) )
        {
                delete pbuffer;
                pbuffer = 0;
@@ -427,10 +427,8 @@ void VFrame::dump_shader(int shader_id)
 void VFrame::clear_pbuffer()
 {
 #ifdef HAVE_GL
-       if(BC_CModels::is_yuv(get_color_model()))
-               glClearColor(0.0, 0.5, 0.5, 0.0);
-       else
-               glClearColor(0.0, 0.0, 0.0, 0.0);
+       float gbuv = BC_CModels::is_yuv(get_color_model()) ? 0.5 : 0;
+       glClearColor(0.0, gbuv, gbuv, 0.0);
        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 #endif
 }