merged lp:~hikiko/libgliar/libgliar.new-features to lp:libgliar
[libgliar] / tests / extbyindex / extbyindex.c
1 #include <stdio.h>
2 #define GL_GLEXT_PROTOTYPES     1
3 #include <GL/glut.h>
4 #include "glext.h"
5
6 #if !defined(GL_VERSION_3_0) || !GL_VERSION_3_0
7 #error "OpenGL version 3.0 required"
8 #endif
9
10 int main(int argc, char **argv)
11 {
12         int i, num_ext;
13
14         glutInit(&argc, argv);
15         glutCreateWindow("ext-by-index");
16
17         glGetIntegerv(GL_NUM_EXTENSIONS, &num_ext);
18         printf("Extensions:\n");
19         for(i=0; i<num_ext; i++) {
20                 printf("%d: %s\n", i, (char*)glGetStringi(GL_EXTENSIONS, i));
21         }
22         return 0;
23 }