Ejemplo n.º 1
0
QFLightSourceComboBox::QFLightSourceComboBox(QFExtensionManager* extManager, QWidget* parent):
    QFEnhancedComboBox(parent)
{
    m_extManager=extManager;
    setSizeAdjustPolicy(QComboBox::AdjustToContents);

    findExtensions();
    connect(this, SIGNAL(currentIndexChanged(int)), this, SLOT(comboIndexChanged(int)));
}
Ejemplo n.º 2
0
Extensions::Extensions(): Singleton<Extensions>() {
    // Query GL extensions
    findExtensions((const char*) glGetString(GL_EXTENSIONS), mGlExtensionList);
    mHasNPot = hasGlExtension("GL_OES_texture_npot");
    mHasFramebufferFetch = hasGlExtension("GL_NV_shader_framebuffer_fetch");
    mHasDiscardFramebuffer = hasGlExtension("GL_EXT_discard_framebuffer");
    mHasDebugMarker = hasGlExtension("GL_EXT_debug_marker");
    mHasDebugLabel = hasGlExtension("GL_EXT_debug_label");
    mHasTiledRendering = hasGlExtension("GL_QCOM_tiled_rendering");
    mHas1BitStencil = hasGlExtension("GL_OES_stencil1");
    mHas4BitStencil = hasGlExtension("GL_OES_stencil4");

    // Query EGL extensions
    findExtensions(eglQueryString(eglGetCurrentDisplay(), EGL_EXTENSIONS), mEglExtensionList);

    char property[PROPERTY_VALUE_MAX];
    if (property_get(PROPERTY_DEBUG_NV_PROFILING, property, NULL) > 0) {
        mHasNvSystemTime = !strcmp(property, "true") && hasEglExtension("EGL_NV_system_time");
    } else {
        mHasNvSystemTime = false;
    }

    const char* version = (const char*) glGetString(GL_VERSION);

    // Section 6.1.5 of the OpenGL ES specification indicates the GL version
    // string strictly follows this format:
    //
    // OpenGL<space>ES<space><version number><space><vendor-specific information>
    //
    // In addition section 6.1.5 describes the version number thusly:
    //
    // "The version number is either of the form major number.minor number or
    // major number.minor number.release number, where the numbers all have one
    // or more digits. The release number and vendor specific information are
    // optional."

    if (sscanf(version, "OpenGL ES %d.%d", &mVersionMajor, &mVersionMinor) != 2) {
        // If we cannot parse the version number, assume OpenGL ES 2.0
        mVersionMajor = 2;
        mVersionMinor = 0;
    }
}
Ejemplo n.º 3
0
void QFLightSourceComboBox::init(QFExtensionManager* extManager) {
    m_extManager=extManager;
    findExtensions();
}