diff options
Diffstat (limited to 'src/test/native/mesa-demos-patched/eglut')
-rw-r--r-- | src/test/native/mesa-demos-patched/eglut/eglut.c | 14 | ||||
-rw-r--r-- | src/test/native/mesa-demos-patched/eglut/eglut.h | 1 |
2 files changed, 15 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) { diff --git a/src/test/native/mesa-demos-patched/eglut/eglut.h b/src/test/native/mesa-demos-patched/eglut/eglut.h index 6ad95cc0f..b1758ff67 100644 --- a/src/test/native/mesa-demos-patched/eglut/eglut.h +++ b/src/test/native/mesa-demos-patched/eglut/eglut.h @@ -76,6 +76,7 @@ int eglutGet(int state); void eglutIdleFunc(EGLUTidleCB func); void eglutPostRedisplay(void); +void eglutSwapInterval(EGLint interval); void eglutMainLoop(void); void eglutStopMainLoop(void); |