Revision: 57140
          http://sourceforge.net/p/brlcad/code/57140
Author:   indianlarry
Date:     2013-08-26 12:28:58 +0000 (Mon, 26 Aug 2013)
Log Message:
-----------
increased point size to 3.0 when drawing points in the Vlist to help standout 
from line drawing; added code to save point size state to restore after vlist 
drawing; propagated vlist point drawing to dm-wgl.c

Modified Paths:
--------------
    brlcad/trunk/src/libdm/dm-ogl.c
    brlcad/trunk/src/libdm/dm-wgl.c

Modified: brlcad/trunk/src/libdm/dm-ogl.c
===================================================================
--- brlcad/trunk/src/libdm/dm-ogl.c     2013-08-26 11:15:21 UTC (rev 57139)
+++ brlcad/trunk/src/libdm/dm-ogl.c     2013-08-26 12:28:58 UTC (rev 57140)
@@ -1629,10 +1629,14 @@
     register int first;
     register int mflag = 1;
     static float black[4] = {0.0, 0.0, 0.0, 0.0};
+    GLdouble pointsize = -1.0; /* initialize to unsavory point size */
 
     if (dmp->dm_debugLevel)
        bu_log("ogl_drawVList()\n");
 
+    /* get incoming point size to restore after drawing loop */
+    glGetDoublev(GL_POINT_SIZE,  &pointsize);
+
     /* Viewing region is from -1.0 to +1.0 */
     first = 1;
     for (BU_LIST_FOR(tvp, bn_vlist, &vp->l)) {
@@ -1734,7 +1738,7 @@
                    if (first == 0)
                        glEnd();
                    first = 0;
-                   glPointSize(1.0);
+                   glPointSize((GLfloat)3.0);
                    glBegin(GL_POINTS);
                    glVertex3dv(dpt);
                    break;
@@ -1745,6 +1749,9 @@
     if (first == 0)
        glEnd();
 
+    /* restore incoming point size */
+    glPointSize((GLfloat)pointsize);
+
     if (dmp->dm_light && dmp->dm_transparency)
        glDisable(GL_BLEND);
 

Modified: brlcad/trunk/src/libdm/dm-wgl.c
===================================================================
--- brlcad/trunk/src/libdm/dm-wgl.c     2013-08-26 11:15:21 UTC (rev 57139)
+++ brlcad/trunk/src/libdm/dm-wgl.c     2013-08-26 12:28:58 UTC (rev 57140)
@@ -1114,10 +1114,14 @@
     register int       first;
     register int mflag = 1;
     float black[4] = {0.0, 0.0, 0.0, 0.0};
+    GLdouble pointsize = -1.0; /* initialize to unsavory point size */
 
     if (dmp->dm_debugLevel)
        bu_log("wgl_drawVList()\n");
 
+    /* get incoming point size to restore after drawing loop */
+    glGetDoublev(GL_POINT_SIZE,  &pointsize);
+
     /* Viewing region is from -1.0 to +1.0 */
     first = 1;
     for (BU_LIST_FOR(tvp, bn_vlist, &vp->l)) {
@@ -1218,6 +1222,14 @@
                    VMOVE(glpt, *pt);
                    glNormal3dv(glpt);
                    break;
+               case BN_VLIST_POINT_DRAW:
+                   if (first == 0)
+                       glEnd();
+                   first = 0;
+                   glPointSize((GLfloat)3.0);
+                   glBegin(GL_POINTS);
+                   glVertex3dv(dpt);
+                   break;
            }
        }
     }
@@ -1225,6 +1237,9 @@
     if (first == 0)
        glEnd();
 
+    /* restore incoming point size */
+    glPointSize((GLfloat)pointsize);
+
     if (dmp->dm_light && dmp->dm_transparency)
        glDisable(GL_BLEND);
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to