Merge branch 'mesa_7_5_branch'
[mesa.git] / progs / demos / pointblast.c
index dbbe2f35a28f80c9ee0fbff4e60a5e01def4ed81..2d70b72589418fdd389642fc6ba8f4ecb7aadca7 100644 (file)
@@ -18,7 +18,7 @@
 #ifdef _WIN32
 #include <windows.h>
 #endif
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
 #include <GL/glut.h>
 
 /* Some <math.h> files do not define M_PI... */
@@ -194,11 +194,11 @@ redraw(void)
 {
   int i;
 
+  glDepthMask(GL_TRUE);
   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
   if (newModel)
     recalcModelView();
 
-  glDepthMask(GL_FALSE);
 
   /* Draw the floor. */
 /*  glEnable(GL_TEXTURE_2D);*/
@@ -215,7 +215,7 @@ redraw(void)
   glEnd();
 
   /* Allow particles to blend with each other. */
-  glDepthMask(GL_TRUE);
+  glDepthMask(GL_FALSE);
 
   if (blend)
      glEnable(GL_BLEND);
@@ -444,6 +444,7 @@ main(int argc, char **argv)
   }
 
   glutCreateWindow("point burst");
+  glewInit();
   glutDisplayFunc(redraw);
   glutMouseFunc(mouse);
   glutMotionFunc(mouseMotion);