summaryrefslogtreecommitdiff
path: root/src/egl/main/eglconfig.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2005-05-17 02:13:00 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2005-05-17 02:13:00 +0000
commit4c80f8df46e6c70c9954364609cd0103030fa2a6 (patch)
tree9019ea2d70b44be91c258de32d73645e1f4c2d9a /src/egl/main/eglconfig.c
parente03b5cdf3fb4dafe565c06179124644e218e9cde (diff)
more work on _eglConfigToContextModesRec()
Diffstat (limited to 'src/egl/main/eglconfig.c')
-rw-r--r--src/egl/main/eglconfig.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/egl/main/eglconfig.c b/src/egl/main/eglconfig.c
index 34195c5277..31a91e5de6 100644
--- a/src/egl/main/eglconfig.c
+++ b/src/egl/main/eglconfig.c
@@ -19,7 +19,7 @@
/**
* Convert an _EGLConfig to a __GLcontextModes object.
*/
-static void
+void
_eglConfigToContextModesRec(const _EGLConfig *config, __GLcontextModes *mode)
{
memset(mode, 0, sizeof(*mode));
@@ -33,8 +33,7 @@ _eglConfigToContextModesRec(const _EGLConfig *config, __GLcontextModes *mode)
mode->greenBits = GET_CONFIG_ATTRIB(config, EGL_GREEN_SIZE);
mode->blueBits = GET_CONFIG_ATTRIB(config, EGL_BLUE_SIZE);
mode->alphaBits = GET_CONFIG_ATTRIB(config, EGL_ALPHA_SIZE);
- mode->rgbBits = mode->redBits + mode->greenBits
- + mode->blueBits + mode->alphaBits;
+ mode->rgbBits = GET_CONFIG_ATTRIB(config, EGL_BUFFER_SIZE);
mode->depthBits = GET_CONFIG_ATTRIB(config, EGL_DEPTH_SIZE);
mode->haveDepthBuffer = mode->depthBits > 0;
@@ -42,6 +41,8 @@ _eglConfigToContextModesRec(const _EGLConfig *config, __GLcontextModes *mode)
mode->stencilBits = GET_CONFIG_ATTRIB(config, EGL_STENCIL_SIZE);
mode->haveStencilBuffer = mode->stencilBits > 0;
+ /* no accum */
+
mode->level = GET_CONFIG_ATTRIB(config, EGL_LEVEL);
mode->samples = GET_CONFIG_ATTRIB(config, EGL_SAMPLES);
mode->sampleBuffers = GET_CONFIG_ATTRIB(config, EGL_SAMPLE_BUFFERS);