From 2e61d136c27b9c740190643668f1e3509ce609dc Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Sat, 24 Jan 2009 16:39:49 +0000 Subject: progs: Port most of the demos to glew. A couple of test weren't ported due to glew breakage -- it undefines GLAPIENTRY. --- progs/demos/pointblast.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'progs/demos/pointblast.c') diff --git a/progs/demos/pointblast.c b/progs/demos/pointblast.c index dbbe2f35a2..2a91b76ad3 100644 --- a/progs/demos/pointblast.c +++ b/progs/demos/pointblast.c @@ -18,7 +18,7 @@ #ifdef _WIN32 #include #endif -#define GL_GLEXT_PROTOTYPES +#include #include /* Some files do not define M_PI... */ @@ -444,6 +444,7 @@ main(int argc, char **argv) } glutCreateWindow("point burst"); + glewInit(); glutDisplayFunc(redraw); glutMouseFunc(mouse); glutMotionFunc(mouseMotion); -- cgit v1.2.3 From f359165a8295a2f3bff7c80a8e45d91ca98392a9 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 30 Jun 2009 17:29:14 -0700 Subject: demos: Set the depth mask correctly to get the desired blending --- progs/demos/pointblast.c | 4 ++-- progs/demos/spriteblast.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'progs/demos/pointblast.c') diff --git a/progs/demos/pointblast.c b/progs/demos/pointblast.c index 2a91b76ad3..2d70b72589 100644 --- a/progs/demos/pointblast.c +++ b/progs/demos/pointblast.c @@ -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); diff --git a/progs/demos/spriteblast.c b/progs/demos/spriteblast.c index f6630c25d0..d73b680b79 100644 --- a/progs/demos/spriteblast.c +++ b/progs/demos/spriteblast.c @@ -209,13 +209,13 @@ redraw(void) { int i; + glDepthMask(GL_TRUE); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glPushMatrix(); glRotatef(15.0, 1.0, 0.0, 0.0); glRotatef(angle, 0.0, 1.0, 0.0); - glDepthMask(GL_FALSE); /* Draw the floor. */ /* glEnable(GL_TEXTURE_2D);*/ @@ -232,7 +232,7 @@ redraw(void) glEnd(); /* Allow particles to blend with each other. */ - glDepthMask(GL_TRUE); + glDepthMask(GL_FALSE); if (blend) glEnable(GL_BLEND); -- cgit v1.2.3