Mercurial > mxe-octave
annotate src/glew-test.c @ 5494:898c27394c57
Use python3 in scripts (bug #58689).
* Makefile.in: native mingw, depend on python3, set PYTHON3 var
* tools/msys2-install.py: update for python3 syntax
* tools/pkg-install.py: update for python3 syntax
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Sat, 04 Jul 2020 12:14:29 -0400 |
parents | 99516e73b368 |
children |
rev | line source |
---|---|
2351
8a6c466753e2
Improve comment style of all test programs
Volker Grabsch <vog@notjusthosting.com>
parents:
2333
diff
changeset
|
1 /* |
8a6c466753e2
Improve comment style of all test programs
Volker Grabsch <vog@notjusthosting.com>
parents:
2333
diff
changeset
|
2 * This file is part of MXE. |
2353
99516e73b368
Move doc/index.html -> index.html
Volker Grabsch <vog@notjusthosting.com>
parents:
2351
diff
changeset
|
3 * See index.html for further information. |
2351
8a6c466753e2
Improve comment style of all test programs
Volker Grabsch <vog@notjusthosting.com>
parents:
2333
diff
changeset
|
4 */ |
1992
a8709467c874
package glew: add test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
5 |
a8709467c874
package glew: add test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
6 #include <stdio.h> |
a8709467c874
package glew: add test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
7 #include <GL/glew.h> |
a8709467c874
package glew: add test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
8 |
2271
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
9 #ifdef GLEW_MX |
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
10 /* We are using the multi-context variant of libGLEW */ |
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
11 GLEWContext glew_context; |
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
12 GLEWContext* glewGetContext() |
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
13 { |
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
14 return &glew_context; |
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
15 } |
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
16 #endif |
3e532768cd27
Make the glew package build and install GLEWmx.
Martin Lambers <marlam@marlam.de>
parents:
1992
diff
changeset
|
17 |
1992
a8709467c874
package glew: add test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
18 int main(int argc, char *argv[]) |
a8709467c874
package glew: add test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
19 { |
a8709467c874
package glew: add test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
20 GLenum err; |
a8709467c874
package glew: add test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
21 |
a8709467c874
package glew: add test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
22 (void)argc; |
a8709467c874
package glew: add test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
23 (void)argv; |
a8709467c874
package glew: add test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
24 |
a8709467c874
package glew: add test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
25 err = glewInit(); |
a8709467c874
package glew: add test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
26 if (GLEW_OK != err) |
a8709467c874
package glew: add test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
27 { |
a8709467c874
package glew: add test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
28 fprintf(stderr, "Error: %s\n", glewGetErrorString(err)); |
a8709467c874
package glew: add test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
29 } |
a8709467c874
package glew: add test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
30 fprintf(stdout, "Status: Using GLEW %s\n", glewGetString(GLEW_VERSION)); |
a8709467c874
package glew: add test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
31 |
a8709467c874
package glew: add test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
32 return 0; |
a8709467c874
package glew: add test program
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
33 } |