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;
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
}