aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pointcloud.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/pointcloud.cpp b/pointcloud.cpp
index d762366..3bdccce 100644
--- a/pointcloud.cpp
+++ b/pointcloud.cpp
@@ -46,6 +46,9 @@ PointCloud::PointCloud(size_t num_points) :
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(6,(double)640/480,1,1000);
+
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glEnable(GL_BLEND);
}
// Not really a border, but you get the idea
@@ -172,11 +175,11 @@ void PointCloud::draw()
0.5,0.5,0,
0,1,0);
- glPointSize(4.0);
+ glPointSize(3.0);
glBegin(GL_POINTS);
for (size_t n = 0; n < v.size(); n++){
- glColor3ub(v[n].r, v[n].g, v[n].b);
+ glColor4ub(v[n].r, v[n].g, v[n].b, 50);
glVertex3d(v[n].x, v[n].y, v[n].z);
}
glEnd();