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

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



The branch, master has been updated
       via  db0e9058620182d20fe9afc3831c739ff7c90693 (commit)
      from  20ae1d4661d491279ba97d01fc90c16099ae8b48 (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/common/hidgl.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)


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

commit db0e9058620182d20fe9afc3831c739ff7c90693
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    hid/common/hidgl.c: Fix vertex array state preservation
    
    Fixes a bug with crosshair attached objects not being visible
    when the grid was rendered.
    
    Reported-by: Colin D Bennett <colin@xxxxxxxxxxx>
    Closes-bug: lp-780958

:100644 100644 fb6b118... 21322f7... M	src/hid/common/hidgl.c

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

commit db0e9058620182d20fe9afc3831c739ff7c90693
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    hid/common/hidgl.c: Fix vertex array state preservation
    
    Fixes a bug with crosshair attached objects not being visible
    when the grid was rendered.
    
    Reported-by: Colin D Bennett <colin@xxxxxxxxxxx>
    Closes-bug: lp-780958

diff --git a/src/hid/common/hidgl.c b/src/hid/common/hidgl.c
index fb6b118..21322f7 100644
--- a/src/hid/common/hidgl.c
+++ b/src/hid/common/hidgl.c
@@ -66,8 +66,6 @@ float global_depth = 0;
 void
 hidgl_init_triangle_array (triangle_buffer *buffer)
 {
-  glEnableClientState (GL_VERTEX_ARRAY);
-  glVertexPointer (3, GL_FLOAT, 0, buffer->triangle_array);
   buffer->triangle_count = 0;
   buffer->coord_comp_count = 0;
 }
@@ -78,7 +76,11 @@ hidgl_flush_triangles (triangle_buffer *buffer)
   if (buffer->triangle_count == 0)
     return;
 
+  glEnableClientState (GL_VERTEX_ARRAY);
+  glVertexPointer (3, GL_FLOAT, 0, buffer->triangle_array);
   glDrawArrays (GL_TRIANGLES, 0, buffer->triangle_count * 3);
+  glDisableClientState (GL_VERTEX_ARRAY);
+
   buffer->triangle_count = 0;
   buffer->coord_comp_count = 0;
 }
@@ -140,6 +142,7 @@ hidgl_draw_grid (BoxType *drawn_area)
       points = realloc (points, npoints * 3 * sizeof (GLfloat));
     }
 
+  glPushAttrib ();
   glEnableClientState (GL_VERTEX_ARRAY);
   glVertexPointer (3, GL_FLOAT, 0, points);
 




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