3 * Test Linux 8-bit SVGA/Mesa color index mode
5 * Compile with: gcc vindex.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"
20 static GLint width
= 640, height
= 480;
24 static void display( void )
29 glViewport( 0, 0, width
, height
);
30 glMatrixMode( GL_PROJECTION
);
32 glOrtho( 0.0, (GLfloat
) width
, 0.0, (GLfloat
) height
, -1.0, 1.0 );
34 glClear( GL_COLOR_BUFFER_BIT
);
41 glRecti( i
*w
, j
*h
, i
*w
+w
, j
*h
+h
);
48 int main( int argc
, char *argv
[] )
54 vga_setmode( G640x480x256
);
56 vmc
= SVGAMesaCreateContext( GL_FALSE
);
57 SVGAMesaMakeCurrent( vmc
);
62 SVGAMesaDestroyContext( vmc
);