diff options
Diffstat (limited to 'src/test/native/mesa-demos-patched/eglut/eglut.c')
-rw-r--r-- | src/test/native/mesa-demos-patched/eglut/eglut.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/native/mesa-demos-patched/eglut/eglut.c b/src/test/native/mesa-demos-patched/eglut/eglut.c index a974e1dc7..eb72f6417 100644 --- a/src/test/native/mesa-demos-patched/eglut/eglut.c +++ b/src/test/native/mesa-demos-patched/eglut/eglut.c @@ -91,6 +91,7 @@ _eglutChooseConfig(void) EGLConfig config; EGLint config_attribs[32]; EGLint renderable_type, num_configs, i; + EGLint cfgid, vid; i = 0; config_attribs[i++] = EGL_RED_SIZE; @@ -123,6 +124,15 @@ _eglutChooseConfig(void) config_attribs, &config, 1, &num_configs) || !num_configs) _eglutFatal("failed to choose a config"); + if (!eglGetConfigAttrib(_eglut->dpy, + config, EGL_CONFIG_ID, &cfgid)) + _eglutFatal("failed to get visual id"); + if (!eglGetConfigAttrib(_eglut->dpy, + config, EGL_NATIVE_VISUAL_ID, &vid)) + _eglutFatal("failed to get visual id"); + + fprintf(stderr, "eglChooseConfig egl-cfg-id 0x%X, vid 0x%X\n", cfgid, vid); + return config; } @@ -342,6 +352,10 @@ eglutCreateWindow(const char *title) return win->index; } +void eglutSwapInterval(EGLint interval) { + eglSwapInterval(_eglut->dpy, interval); +} + int eglutGetWindowWidth(void) { |