more work on _eglConfigToContextModesRec()
This commit is contained in:
parent
e03b5cdf3f
commit
4c80f8df46
|
@ -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);
|
||||
|
|
|
@ -18,7 +18,7 @@ struct _egl_config
|
|||
};
|
||||
|
||||
|
||||
|
||||
#define SET_CONFIG_ATTRIB(CONF, ATTR, VAL) ((CONF)->Attrib[(ATTR) - FIRST_ATTRIB] = VAL)
|
||||
#define GET_CONFIG_ATTRIB(CONF, ATTR) ((CONF)->Attrib[(ATTR) - FIRST_ATTRIB])
|
||||
|
||||
|
||||
|
@ -69,4 +69,8 @@ _eglFillInConfigs( _EGLConfig *configs,
|
|||
const GLenum * db_modes, unsigned num_db_modes,
|
||||
int visType );
|
||||
|
||||
extern void
|
||||
_eglConfigToContextModesRec(const _EGLConfig *config, __GLcontextModes *mode);
|
||||
|
||||
|
||||
#endif /* EGLCONFIG_INCLUDED */
|
||||
|
|
Loading…
Reference in New Issue