On Tue, 2010-06-08 at 01:05 +0200, Krzysztof Kościuszkiewicz wrote: > All, > > I have noticed two bugs with recent git versions of gl-enabled pcb > (6507083b0401e0). > > 1) Garbage is displayed outside of board area.
Try this patch, and see if it changes the behaviour / helps / breaks things further. NB: Cursory playing suggests that my "master" branch (with pours) doesn't work quite correctly with user-defined holes in polygons. -- Peter Clifton Electrical Engineering Division, Engineering Department, University of Cambridge, 9, JJ Thomson Avenue, Cambridge CB3 0FA Tel: +44 (0)7729 980173 - (No signal in the lab!) Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)
diff --git a/src/hid/gtk/gui-output-events.c b/src/hid/gtk/gui-output-events.c index 1fa2640..efce5ec 100644 --- a/src/hid/gtk/gui-output-events.c +++ b/src/hid/gtk/gui-output-events.c @@ -73,6 +73,7 @@ static GLfloat last_modelview_matrix[4][4] = {{1.0, 0.0, 0.0, 0.0}, {0.0, 0.0, 0.0, 1.0}}; static int global_view_2d = 1; +static bool check_gl_drawing_ok_hack = false; /* Set to true if cursor is currently in viewport. This is a hack to prevent * Crosshair stack corruption due to unmatching window enter / leave events */ @@ -596,6 +597,9 @@ ghid_show_crosshair (gboolean show) static GdkColor cross_color; extern float global_depth; + if (!check_gl_drawing_ok_hack) + return; + if (gport->x_crosshair < 0 || ghidgui->creating) {// || !gport->has_entered) { printf ("Returning\n"); return; @@ -1752,6 +1756,8 @@ ghid_port_drawing_area_expose_event_cb (GtkWidget * widget, hidgl_init (); + check_gl_drawing_ok_hack = true; + /* If we don't have any stencil bits available, we can't use the hidgl polygon drawing routine */ /* TODO: We could use the GLU tessellator though */ @@ -1974,6 +1980,8 @@ ghid_port_drawing_area_expose_event_cb (GtkWidget * widget, else glFlush (); + check_gl_drawing_ok_hack = false; + /* end drawing to current GL-context */ gdk_gl_drawable_gl_end (pGlDrawable);
_______________________________________________ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user