move initialization code aroudn so glPointParameter isn't called before checking the extension is present
diff --git a/progs/demos/spriteblast.c b/progs/demos/spriteblast.c
index d6e9a4d..f0d3d0d 100644
--- a/progs/demos/spriteblast.c
+++ b/progs/demos/spriteblast.c
@@ -537,6 +537,9 @@
glutAddMenuEntry("Quit", 666);
glutAttachMenu(GLUT_RIGHT_BUTTON);
+ makePointList();
+ makeSprite();
+
glShadeModel(GL_FLAT);
glEnable(GL_DEPTH_TEST);
glEnable(GL_POINT_SMOOTH);
@@ -546,9 +549,6 @@
glPointParameterfvARB(GL_POINT_DISTANCE_ATTENUATION_ARB, theQuad);
#endif
- makePointList();
- makeSprite();
-
glutMainLoop();
return 0; /* ANSI C requires main to return int. */
}