diff options
author | Dave Airlie <airlied@redhat.com> | 2009-03-20 10:52:17 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-03-20 10:52:17 +1000 |
commit | 407e8ae5b167b0193e1e5b1266a5d61ed836dfb5 (patch) | |
tree | 2d9d05a5c3122f41a13aa8bd9ae921c1176e6b0d /progs/demos/isosurf.c | |
parent | bdaa0341caffc353fd26bbd91865c2d86eed11c1 (diff) | |
parent | 114bb54324f22cb53bcd14607234d0acd74d37bd (diff) |
Merge remote branch 'main/master' into radeon-rewrite
Conflicts:
src/mesa/drivers/dri/r300/r300_cmdbuf.c
src/mesa/drivers/dri/r300/r300_state.c
src/mesa/drivers/dri/r300/r300_swtcl.c
src/mesa/drivers/dri/r300/radeon_ioctl.c
src/mesa/drivers/dri/radeon/radeon_screen.c
Diffstat (limited to 'progs/demos/isosurf.c')
-rw-r--r-- | progs/demos/isosurf.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/progs/demos/isosurf.c b/progs/demos/isosurf.c index 393741cc9d..e280d8f507 100644 --- a/progs/demos/isosurf.c +++ b/progs/demos/isosurf.c @@ -69,6 +69,7 @@ #define NO_STIPPLE 0x08000000 #define POLYGON_FILL 0x10000000 #define POLYGON_LINE 0x20000000 +#define POLYGON_POINT 0x40000000 #define LIGHT_MASK (LIT|UNLIT|REFLECT) #define FILTER_MASK (POINT_FILTER|LINEAR_FILTER) @@ -81,7 +82,7 @@ #define SHADE_MASK (SHADE_SMOOTH|SHADE_FLAT) #define FOG_MASK (FOG|NO_FOG) #define STIPPLE_MASK (STIPPLE|NO_STIPPLE) -#define POLYGON_MASK (POLYGON_FILL|POLYGON_LINE) +#define POLYGON_MASK (POLYGON_FILL|POLYGON_LINE|POLYGON_POINT) #define MAXVERTS 10000 static GLint maxverts = MAXVERTS; @@ -147,7 +148,7 @@ static void read_surface( char *filename ) static void print_flags( const char *msg, GLuint flags ) { fprintf(stderr, - "%s (0x%x): %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n", + "%s (0x%x): %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n", msg, flags, (flags & GLVERTEX) ? "glVertex, " : "", (flags & DRAW_ARRAYS) ? "glDrawArrays, " : "", @@ -166,7 +167,8 @@ static void print_flags( const char *msg, GLuint flags ) (flags & MATERIALS) ? "materials, " : "", (flags & FOG) ? "fog, " : "", (flags & STIPPLE) ? "stipple, " : "", - (flags & POLYGON_LINE) ? "polygon mode line, " : ""); + (flags & POLYGON_LINE) ? "polygon mode line, " : "", + (flags & POLYGON_POINT) ? "polygon mode point, " : ""); } @@ -711,9 +713,12 @@ static void ModeMenu(int m) if (m & POLYGON_FILL) { glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); } - else { + else if (m & POLYGON_LINE) { glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); } + else { + glPolygonMode(GL_FRONT_AND_BACK, GL_POINT); + } } #ifdef GL_EXT_vertex_array @@ -1089,6 +1094,7 @@ int main(int argc, char **argv) glutAddMenuEntry("", 0); glutAddMenuEntry("Polygon Mode Fill", POLYGON_FILL); glutAddMenuEntry("Polygon Mode Line", POLYGON_LINE); + glutAddMenuEntry("Polygon Mode Points", POLYGON_POINT); glutAddMenuEntry("", 0); glutAddMenuEntry("Point Filtered", POINT_FILTER); glutAddMenuEntry("Linear Filtered", LINEAR_FILTER); |