diff options
author | Erik Faye-Lund <erik.faye-lund@collabora.com> | 2023-03-08 12:21:49 +0100 |
---|---|---|
committer | Erik Faye-Lund <erik.faye-lund@collabora.com> | 2023-03-13 08:39:26 +0100 |
commit | 193ebb12f400702e867122b939be659e3cb070c4 (patch) | |
tree | b3c77f92444f3f991d3d6733c3cbb3e1836a94a4 | |
parent | 9780885abc7f0320f46afe92172e94b415555c41 (diff) | |
download | mesa-demos-193ebb12f400702e867122b939be659e3cb070c4.tar.gz |
xdemos: require gl 3.2 headers
The GL_VERSION_X_Y defines tells us that we have an gl.h file that
supports OpenGL X.Y. Considering it's been well over a decade since
OpenGL 3.2 was released, let's just always assume that it's recent
enough.
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
-rw-r--r-- | src/xdemos/glxinfo.c | 10 | ||||
-rw-r--r-- | src/xdemos/offset.c | 13 |
2 files changed, 4 insertions, 19 deletions
diff --git a/src/xdemos/glxinfo.c b/src/xdemos/glxinfo.c index b2381a61..50db0fc4 100644 --- a/src/xdemos/glxinfo.c +++ b/src/xdemos/glxinfo.c @@ -574,28 +574,26 @@ print_screen_info(Display *dpy, int scrnum, CheckError(__LINE__); -#ifdef GL_VERSION_2_0 if (version >= 20) { char *v = (char *) glGetString(GL_SHADING_LANGUAGE_VERSION); printf("%s shading language version string: %s\n", oglstring, v); } -#endif + CheckError(__LINE__); -#ifdef GL_VERSION_3_0 + if (version >= 30 && !es2Profile) { GLint flags; glGetIntegerv(GL_CONTEXT_FLAGS, &flags); printf("%s context flags: %s\n", oglstring, context_flags_string(flags)); } -#endif + CheckError(__LINE__); -#ifdef GL_VERSION_3_2 + if (version >= 32 && !es2Profile) { GLint mask; glGetIntegerv(GL_CONTEXT_PROFILE_MASK, &mask); printf("%s profile mask: %s\n", oglstring, profile_mask_string(mask)); } -#endif CheckError(__LINE__); diff --git a/src/xdemos/offset.c b/src/xdemos/offset.c index 3858a5b8..e1c8ee40 100644 --- a/src/xdemos/offset.c +++ b/src/xdemos/offset.c @@ -127,14 +127,6 @@ int main(int argc, char** argv) { glXMakeCurrent(dpy, win, cx); - /* check for the polygon offset extension */ -#ifndef GL_VERSION_1_1 - if (!query_extension("GL_EXT_polygon_offset")) - error(argv[0], "polygon_offset extension is not available"); -#else - (void) query_extension; -#endif - /* set up viewing parameters */ glMatrixMode(GL_PROJECTION); glFrustum(-1, 1, -1, 1, 6, 20); @@ -147,13 +139,8 @@ int main(int argc, char** argv) { glGetIntegerv(GL_DEPTH_BITS, &z); printf("GL_DEPTH_BITS = %d\n", z); -#ifdef GL_EXT_polygon_offset - printf("using 1.0 offset extension\n"); - glPolygonOffsetEXT( 1.0, 0.00001 ); -#else printf("using 1.1 offset\n"); glPolygonOffset( 1.0, 0.5 ); -#endif glShadeModel( GL_FLAT ); glDisable( GL_DITHER ); |