[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: pcb.git: branch: master updated (51beb7e187b8ee6be6377619f1ea8363c6e82d0c)



The branch, master has been updated
       via  51beb7e187b8ee6be6377619f1ea8363c6e82d0c (commit)
      from  520177fc69554ce68c0b242e3c0fec5945c10ed9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 src/hid/gtk/gtkhid-gl.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)


=================
 Commit Messages
=================

commit 51beb7e187b8ee6be6377619f1ea8363c6e82d0c
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    hid/gtk: Fix z-coordinate scaling for GL views.
    
    (Fixes a 3D rendering bug in my PCB+GL branches, no visible effect
    for git HEAD builds).

:100644 100644 15c9468... e559c4f... M	src/hid/gtk/gtkhid-gl.c

=========
 Changes
=========

commit 51beb7e187b8ee6be6377619f1ea8363c6e82d0c
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    hid/gtk: Fix z-coordinate scaling for GL views.
    
    (Fixes a 3D rendering bug in my PCB+GL branches, no visible effect
    for git HEAD builds).

diff --git a/src/hid/gtk/gtkhid-gl.c b/src/hid/gtk/gtkhid-gl.c
index 15c9468..e559c4f 100644
--- a/src/hid/gtk/gtkhid-gl.c
+++ b/src/hid/gtk/gtkhid-gl.c
@@ -1066,11 +1066,13 @@ ghid_pinout_preview_expose (GtkWidget *widget,
   ghid_invalidate_current_gc ();
   glPushMatrix ();
   glScalef ((gport->view.flip_x ? -1. : 1.) / gport->view.coord_per_px,
-            (gport->view.flip_y ? -1. : 1.) / gport->view.coord_per_px, 1);
+            (gport->view.flip_y ? -1. : 1.) / gport->view.coord_per_px,
+            ((gport->view.flip_x == gport->view.flip_y) ? 1. : -1.) / gport->view.coord_per_px);
   glTranslatef (gport->view.flip_x ? gport->view.x0 - PCB->MaxWidth  :
                                     -gport->view.x0,
                 gport->view.flip_y ? gport->view.y0 - PCB->MaxHeight :
                                     -gport->view.y0, 0);
+
   hid_expose_callback (&ghid_hid, NULL, &pinout->element);
   hidgl_flush_triangles (&buffer);
   glPopMatrix ();
@@ -1167,7 +1169,8 @@ ghid_render_pixmap (int cx, int cy, double zoom, int width, int height, int dept
   ghid_invalidate_current_gc ();
   glPushMatrix ();
   glScalef ((gport->view.flip_x ? -1. : 1.) / gport->view.coord_per_px,
-            (gport->view.flip_y ? -1. : 1.) / gport->view.coord_per_px, 1);
+            (gport->view.flip_y ? -1. : 1.) / gport->view.coord_per_px,
+            ((gport->view.flip_x == gport->view.flip_y) ? 1. : -1.) / gport->view.coord_per_px);
   glTranslatef (gport->view.flip_x ? gport->view.x0 - PCB->MaxWidth  :
                                     -gport->view.x0,
                 gport->view.flip_y ? gport->view.y0 - PCB->MaxHeight :
@@ -1234,7 +1237,7 @@ ghid_request_debug_draw (void)
   glPushMatrix ();
   glScalef ((port->view.flip_x ? -1. : 1.) / port->view.coord_per_px,
             (port->view.flip_y ? -1. : 1.) / port->view.coord_per_px,
-            (port->view.flip_x == port->view.flip_y) ? 1. : -1.);
+            ((gport->view.flip_x == port->view.flip_y) ? 1. : -1.) / gport->view.coord_per_px);
   glTranslatef (port->view.flip_x ? port->view.x0 - PCB->MaxWidth  :
                              -port->view.x0,
                 port->view.flip_y ? port->view.y0 - PCB->MaxHeight :




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs