From 45472672a2764e2ceaf499f586d7c337ddba731c Mon Sep 17 00:00:00 2001 From: Jon Smirl Date: Sun, 15 May 2005 04:00:59 +0000 Subject: A few egl patches needed for glitz, mainly config BITS --- src/egl/main/eglconfig.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/egl/main/eglconfig.c') diff --git a/src/egl/main/eglconfig.c b/src/egl/main/eglconfig.c index ff9a647a8fc..03f2cd047a8 100644 --- a/src/egl/main/eglconfig.c +++ b/src/egl/main/eglconfig.c @@ -28,7 +28,8 @@ _eglInitConfig(_EGLConfig *config, EGLint id) _eglSetConfigAtrib(config, EGL_NATIVE_VISUAL_TYPE, EGL_DONT_CARE); _eglSetConfigAtrib(config, EGL_MIN_SWAP_INTERVAL, EGL_DONT_CARE); _eglSetConfigAtrib(config, EGL_MAX_SWAP_INTERVAL, EGL_DONT_CARE); - _eglSetConfigAtrib(config, EGL_SURFACE_TYPE, EGL_WINDOW_BIT); + _eglSetConfigAtrib(config, EGL_SURFACE_TYPE, + EGL_SCREEN_BIT_MESA | EGL_PBUFFER_BIT | EGL_PIXMAP_BIT | EGL_WINDOW_BIT); _eglSetConfigAtrib(config, EGL_TRANSPARENT_TYPE, EGL_NONE); _eglSetConfigAtrib(config, EGL_TRANSPARENT_RED_VALUE, EGL_DONT_CARE); _eglSetConfigAtrib(config, EGL_TRANSPARENT_GREEN_VALUE, EGL_DONT_CARE); @@ -128,6 +129,7 @@ _eglSetConfigAtrib(_EGLConfig *config, EGLint attr, EGLint val) case EGL_SAMPLE_BUFFERS: break; case EGL_SURFACE_TYPE: + config->glmode.drawableType = val; break; case EGL_TRANSPARENT_TYPE: break; @@ -375,13 +377,15 @@ _eglGetConfigs(_EGLDriver *drv, EGLDisplay dpy, EGLConfig *configs, EGLint confi return EGL_FALSE; } - *num_config = MIN2(disp->NumConfigs, config_size); if (configs) { EGLint i; + *num_config = MIN2(disp->NumConfigs, config_size); for (i = 0; i < *num_config; i++) { configs[i] = disp->Configs[i].Handle; } - } + } else + *num_config = disp->NumConfigs; + return EGL_TRUE; } @@ -592,7 +596,9 @@ _eglFillInConfigs(_EGLConfig * configs, config->glmode.visualType = visType; config->glmode.renderType = GLX_RGBA_BIT; - config->glmode.drawableType = GLX_WINDOW_BIT; + _eglSetConfigAtrib(config, EGL_SURFACE_TYPE, EGL_SCREEN_BIT_MESA | + EGL_PBUFFER_BIT | EGL_PIXMAP_BIT | EGL_WINDOW_BIT); + config->glmode.rgbMode = GL_TRUE; if (db_modes[i] == GLX_NONE) { -- cgit v1.2.3