3 * Test SVGA/Mesa interface in 32K color mode.
5 * Compile with: gcc vtest.c -I../include -L../lib -lMesaGL -lX11 -lXext
8 * This program is in the public domain.
9 * Brian Paul, January 1996
15 #include "GL/svgamesa.h"
27 vga_setmode(G800x600x32K
);
28 /* gl_setcontextvga(G800x600x32K);*/
30 vmc
= SVGAMesaCreateContext( GL_FALSE
); /* single buffered */
31 SVGAMesaMakeCurrent( vmc
);
37 glMatrixMode(GL_PROJECTION
);
39 glOrtho( -1.0, 1.0, -1.0, 1.0, -1.0, 1.0 );
40 glMatrixMode(GL_MODELVIEW
);
42 glClear( GL_COLOR_BUFFER_BIT
);
45 glColor3f( 1.0, 0.0, 0.0 );
46 glVertex2f( -0.5, 0.5 );
47 glVertex2f( 0.5, 0.5 );
48 glColor3f( 0.0, 1.0, 0.0 );
49 glVertex2f( -0.5, 0.25 );
50 glVertex2f( 0.5, 0.25 );
51 glColor3f( 0.0, 0.0, 1.0 );
52 glVertex2f( -0.5, 0.0 );
53 glVertex2f( 0.5, 0.0 );
56 glBegin( GL_POLYGON
);
57 glColor3f( 1.0, 0.0, 0.0 );
58 glVertex2f( 0.0, 0.7 );
59 glColor3f( 0.0, 1.0, 0.0 );
60 glVertex2f( -0.5, -0.5 );
61 glColor3f( 0.0, 0.0, 1.0 );
62 glVertex2f( 0.5, -0.5 );
70 SVGAMesaDestroyContext( vmc
);
76 int main( int argc
, char *argv
[] )