Revision: 57227
http://sourceforge.net/p/brlcad/code/57227
Author: n_reed
Date: 2013-08-28 17:51:55 +0000 (Wed, 28 Aug 2013)
Log Message:
-----------
Address r57194 concern. Need to declare temporary variables for wgl (missed in
copy-paste from ogl). Localize them to make their transience clear.
Revision Links:
--------------
http://sourceforge.net/p/brlcad/code/57194
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-28 17:41:51 UTC (rev 57226)
+++ brlcad/trunk/src/libdm/dm-ogl.c 2013-08-28 17:51:55 UTC (rev 57227)
@@ -1645,7 +1645,6 @@
int *cmd = tvp->cmd;
point_t *pt = tvp->pt;
for (i = 0; i < nused; i++, cmd++, pt++) {
- GLfloat pointSize, lineWidth;
GLdouble dpt[3];
VMOVE(dpt, *pt);
@@ -1742,18 +1741,20 @@
glBegin(GL_POINTS);
glVertex3dv(dpt);
break;
- case BN_VLIST_LINE_WIDTH:
- lineWidth = (GLfloat)(*pt)[0];
+ case BN_VLIST_LINE_WIDTH: {
+ GLfloat lineWidth = (GLfloat)(*pt)[0];
if (lineWidth > 0.0) {
glLineWidth(lineWidth);
}
break;
- case BN_VLIST_POINT_SIZE:
- pointSize = (GLfloat)(*pt)[0];
+ }
+ case BN_VLIST_POINT_SIZE: {
+ GLfloat pointSize = (GLfloat)(*pt)[0];
if (pointSize > 0.0) {
glPointSize(pointSize);
}
break;
+ }
}
}
}
Modified: brlcad/trunk/src/libdm/dm-wgl.c
===================================================================
--- brlcad/trunk/src/libdm/dm-wgl.c 2013-08-28 17:41:51 UTC (rev 57226)
+++ brlcad/trunk/src/libdm/dm-wgl.c 2013-08-28 17:51:55 UTC (rev 57227)
@@ -1226,22 +1226,23 @@
if (first == 0)
glEnd();
first = 0;
- glPointSize(1.0);
glBegin(GL_POINTS);
glVertex3dv(glpt);
break;
- case BN_VLIST_LINE_WIDTH:
- originalLineWidth = (GLfloat)(*pt)[0];
- if (originalLineWidth > 0.0) {
- glLineWidth(originalLineWidth);
+ case BN_VLIST_LINE_WIDTH: {
+ GLfloat lineWidth = (GLfloat)(*pt)[0];
+ if (lineWidth > 0.0) {
+ glLineWidth(lineWidth);
}
break;
- case BN_VLIST_POINT_SIZE:
- originalPointSize = (GLfloat)(*pt)[0];
- if (originalPointSize > 0.0) {
- glPointSize(originalPointSize);
+ }
+ case BN_VLIST_POINT_SIZE: {
+ GLfloat pointSize = (GLfloat)(*pt)[0];
+ if (pointSize > 0.0) {
+ glPointSize(pointSize);
}
break;
+ }
}
}
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits