From: Good Guy Date: Mon, 1 Jul 2019 23:17:50 +0000 (-0600) Subject: fix make_shader segment count, repair mask tweak keyfrm updates for xlat,rotate,scale X-Git-Tag: 2019-08~25 X-Git-Url: https://cinelerra-gg.org/git/?a=commitdiff_plain;h=c5451a0a1f2a69ffea5e8b85d05787466f355481;p=goodguy%2Fcinelerra.git fix make_shader segment count, repair mask tweak keyfrm updates for xlat,rotate,scale --- diff --git a/cinelerra-5.1/cinelerra/cwindowgui.C b/cinelerra-5.1/cinelerra/cwindowgui.C index eaf4af4e..97ca8e67 100644 --- a/cinelerra-5.1/cinelerra/cwindowgui.C +++ b/cinelerra-5.1/cinelerra/cwindowgui.C @@ -1455,7 +1455,7 @@ int CWindowCanvas::do_mask(int &redraw, int &rerender, mask_autos->get_prev_auto(position, PLAY_FORWARD, (Auto *&)prev_auto, 1); MaskAuto *prev_mask = (MaskAuto *)prev_auto; ArrayList points; - + int update_points = 1; // Determine the points based on whether // new keyframes will be generated or drawing is performed. // If keyframe generation occurs, use the interpolated mask. @@ -2099,7 +2099,7 @@ int CWindowCanvas::do_mask(int &redraw, int &rerender, gui->y_origin = mask_cursor_y; rerender = 1; redraw = 1; - track = 0; + update_points = 0; break; } case CWINDOW_MASK_ROTATE: rotate = 1; @@ -2158,7 +2158,7 @@ int CWindowCanvas::do_mask(int &redraw, int &rerender, } rerender = 1; redraw = 1; - track = 0; + update_points = 0; break; } } @@ -2226,7 +2226,8 @@ int CWindowCanvas::do_mask(int &redraw, int &rerender, MaskAuto temp_keyframe(mwindow->edl, mask_autos); temp_keyframe.copy_data(gui->mask_keyframe); // Apply interpolated points back to keyframe - temp_keyframe.set_points(&points, mwindow->edl->session->cwindow_mask); + if( update_points ) + temp_keyframe.set_points(&points, mwindow->edl->session->cwindow_mask); gui->mask_keyframe->copy_data(gui->orig_mask_keyframe); mask_autos->update_parameter(&temp_keyframe); } diff --git a/cinelerra-5.1/guicast/vframe3d.C b/cinelerra-5.1/guicast/vframe3d.C index 52f096d7..d7d4af0a 100644 --- a/cinelerra-5.1/guicast/vframe3d.C +++ b/cinelerra-5.1/guicast/vframe3d.C @@ -398,13 +398,16 @@ unsigned int VFrame::make_shader(const char **segments, ...) unsigned int program = 0; #ifdef HAVE_GL // Construct single source file out of arguments - int nb_segs = 1; - if( !segments ) { + int nb_segs = 0; + if( !segments ) { // arg list va_list list; va_start(list, segments); while( va_arg(list, char*) != 0 ) ++nb_segs; va_end(list); } - const char *segs[nb_segs]; + else { // segment list + while( segments[nb_segs] ) ++nb_segs; + } + const char *segs[++nb_segs]; if( !segments ) { va_list list; va_start(list, segments); for( int i=0; i