X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fvframe3d.C;h=90d75d7b76f6473ec593c870b83b60c0276fd301;hb=f5725c7e12def18fec49a295dad688652edaa4b3;hp=42d91ba1af0b77d1a9243a3d1db105e02a84c6e8;hpb=8fd64d1d3770c95e2a7cba1049e909cadb4e1fbf;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/guicast/vframe3d.C b/cinelerra-5.1/guicast/vframe3d.C index 42d91ba1..90d75d7b 100644 --- a/cinelerra-5.1/guicast/vframe3d.C +++ b/cinelerra-5.1/guicast/vframe3d.C @@ -76,15 +76,6 @@ int VFrame::get_texture_components() } - - - - - - - - - void VFrame::to_texture() { #ifdef HAVE_GL @@ -147,7 +138,11 @@ void VFrame::to_texture() void VFrame::create_pbuffer() { +#ifdef GLx4 int ww = (get_w()+3) & ~3, hh = (get_h()+3) & ~3; +#else + int ww = get_w(), hh = get_h(); +#endif if( pbuffer && (pbuffer->w != ww || pbuffer->h != hh || pbuffer->window_id != BC_WindowBase::get_synchronous()->current_window->get_id() ) ) { delete pbuffer; @@ -293,6 +288,10 @@ void VFrame::init_screen(int w, int h) glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, zero); glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, zero); glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 0); +#ifndef GLx4 + glPixelStorei(GL_PACK_ALIGNMENT,1); + glPixelStorei(GL_UNPACK_ALIGNMENT,1); +#endif #endif }