1 /* $Id: vindex.c,v 1.1 1999/08/19 00:55:43 jtg Exp $ */
4 * Test Linux 8-bit SVGA/Mesa color index mode
6 * Compile with: gcc vindex.c -I../include -L../lib -lMesaGL -lX11 -lXext
9 * This program is in the public domain.
10 * Brian Paul, January 1996
16 #include "GL/svgamesa.h"
21 static GLint width
= 640, height
= 480;
25 static void display( void )
30 glViewport( 0, 0, width
, height
);
31 glMatrixMode( GL_PROJECTION
);
33 glOrtho( 0.0, (GLfloat
) width
, 0.0, (GLfloat
) height
, -1.0, 1.0 );
35 glClear( GL_COLOR_BUFFER_BIT
);
42 glRecti( i
*w
, j
*h
, i
*w
+w
, j
*h
+h
);
49 int main( int argc
, char *argv
[] )
55 vga_setmode( G640x480x256
);
57 vmc
= SVGAMesaCreateContext( GL_FALSE
);
58 SVGAMesaMakeCurrent( vmc
);
63 SVGAMesaDestroyContext( vmc
);