diff options
author | Fabian Bieler <fabianbieler@fastmail.fm> | 2014-02-05 22:07:52 +0100 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2014-03-08 02:09:12 -0800 |
commit | f827282a995db88f76666649cdd43b0a3cbc008f (patch) | |
tree | b6d54ae2c259e6011ebfe3c2d6f9b8885596df69 /src | |
parent | 47a89ea50bf285e9da4e86da75d53f5634650fbf (diff) |
geom-outlining-150: Switch to core profile.
Signed-off-by: Fabian Bieler <fabianbieler@fastmail.fm>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/glsl/geom-outlining-150.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/glsl/geom-outlining-150.c b/src/glsl/geom-outlining-150.c index 3dffa16c..2e2a54ae 100644 --- a/src/glsl/geom-outlining-150.c +++ b/src/glsl/geom-outlining-150.c @@ -364,9 +364,22 @@ main(int argc, char *argv[]) { glutInit(&argc, argv); glutInitWindowSize(WinWidth, WinHeight); +#ifdef HAVE_FREEGLUT + glutInitContextVersion(3, 2); + glutInitContextProfile(GLUT_CORE_PROFILE); glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE); +#elif defined __APPLE__ + glutInitDisplayMode(GLUT_3_2_CORE_PROFILE | GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE); +#else + glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE); +#endif Win = glutCreateWindow(argv[0]); + /* glewInit requires glewExperimentel set to true for core profiles. + * Depending on the glew version it also generates a GL_INVALID_ENUM. + */ + glewExperimental = GL_TRUE; glewInit(); + glGetError(); glutReshapeFunc(Reshape); glutKeyboardFunc(Key); glutDisplayFunc(Redisplay); |