Example #1
0
void EglDisplay::initConfigurations(int renderableType) {
    if(m_configInitialized) return;
    EglOS::queryConfigs(m_dpy,renderableType,m_configs);

    addMissingConfigs();
    m_configs.sort(compareEglConfigsPtrs);
}
void EglDisplay::initConfigurations(int renderableType) {
    if (m_configInitialized) {
        return;
    }
    m_idpy->queryConfigs(renderableType, addConfig, this);

    addMissingConfigs();
    m_configs.sort(compareEglConfigsPtrs);

#if EMUGL_DEBUG
    for (ConfigsList::const_iterator it = m_configs.begin();
         it != m_configs.end();
         it++) {
        EglConfig* config = *it;
        EGLint red, green, blue, alpha, depth, stencil, renderable, surface;
        config->getConfAttrib(EGL_RED_SIZE, &red);
        config->getConfAttrib(EGL_GREEN_SIZE, &green);
        config->getConfAttrib(EGL_BLUE_SIZE, &blue);
        config->getConfAttrib(EGL_ALPHA_SIZE, &alpha);
        config->getConfAttrib(EGL_DEPTH_SIZE, &depth);
        config->getConfAttrib(EGL_STENCIL_SIZE, &stencil);
        config->getConfAttrib(EGL_RENDERABLE_TYPE, &renderable);
        config->getConfAttrib(EGL_SURFACE_TYPE, &surface);
        fprintf(stderr,
                "%s: Config address=%p id=%d r/g/b/a/d/s=%d/%d/%d/%d/%d/%d renderable=%d surface=%d\n",
                __FUNCTION__, config, config->id(), red, green, blue, alpha,
                depth, stencil, renderable, surface);
    }
#endif  // EMUGL_DEBUG
}