2 libgliar - a library that can fake the OpenGL context info returned by
5 Copyright (C) 2013 Canonical Ltd
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 Author: Eleni Maria Stea <elene.mst@gmail.com>
26 #define GET_INTEGER(x) (glGetIntegerv(x, &val), val)
28 int main(int argc, char **argv)
32 glutInit(&argc, argv);
33 glutCreateWindow("glinfo");
35 printf("vendor: %s\n", glGetString(GL_VENDOR));
36 printf("renderer: %s\n", glGetString(GL_RENDERER));
37 printf("version: %s\n", glGetString(GL_VERSION));
38 printf("shading language version: %s\n", glGetString(GL_SHADING_LANGUAGE_VERSION));
39 printf("major version: %d\n", GET_INTEGER(GL_MAJOR_VERSION));
40 printf("minor version: %d\n", GET_INTEGER(GL_MINOR_VERSION));
41 printf("max texture units: %d\n", GET_INTEGER(GL_MAX_TEXTURE_UNITS));
42 printf("max texture image units: %d\n", GET_INTEGER(GL_MAX_TEXTURE_IMAGE_UNITS));
43 printf("max combined texture image units: %d\n", GET_INTEGER(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS));
44 printf("max vertex texture image units: %d\n", GET_INTEGER(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS));
45 printf("max texture size: %d\n", GET_INTEGER(GL_MAX_TEXTURE_SIZE));
46 printf("max cube map texture size: %d\n", GET_INTEGER(GL_MAX_CUBE_MAP_TEXTURE_SIZE));
47 printf("max texture coordinates: %d\n", GET_INTEGER(GL_MAX_TEXTURE_COORDS));
48 printf("max vertex attributes: %d\n", GET_INTEGER(GL_MAX_VERTEX_ATTRIBS));
49 printf("max vertex uniform vectors: %d\n", GET_INTEGER(GL_MAX_VERTEX_UNIFORM_VECTORS));
50 printf("max fragment uniform vectors: %d\n", GET_INTEGER(GL_MAX_FRAGMENT_UNIFORM_VECTORS));
51 printf("max varying vectors: %d\n", GET_INTEGER(GL_MAX_VARYING_VECTORS));
52 printf("max color attachments: %d\n", GET_INTEGER(GL_MAX_COLOR_ATTACHMENTS_EXT));
53 printf("max renderbuffer size: %d\n", GET_INTEGER(GL_MAX_RENDERBUFFER_SIZE_EXT));