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));
40 printf("texture units: %d\n", GET_INTEGER(GL_MAX_TEXTURE_UNITS));
41 printf("max texture size: %d\n", GET_INTEGER(GL_MAX_TEXTURE_SIZE));
42 printf("max texture coordinates: %d\n", GET_INTEGER(GL_MAX_TEXTURE_COORDS));