Exemplo n.º 1
0
    virtual void SetUp()
    {
        ShBuiltInResources resources;
        ShInitBuiltInResources(&resources);
        resources.MaxDrawBuffers = 8;

        initTranslator(resources);
    }
Exemplo n.º 2
0
int UI_Init(int nargc, char **nargv)
{
	initTranslator();

	global_argc = nargc;
	global_argv = nargv;

	return 0;
}
Exemplo n.º 3
0
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent, Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinimizeButtonHint | Qt::WindowCloseButtonHint), skype_path(QString()), skype_was_killed(false)
{
    /* Back-end */
    //Settings
    settings = new QSettings("skype-mood.ini", QSettings::IniFormat, this);

    //Translation
    initTranslator();

    //Get Skype path
    if(!findSkype())
    {
        QMessageBox::warning(this, tr("Skype not found"), tr("Skype executable not found, some features won't work."));
    }

    //History data
    history_model = new QStringListModel(settings->value("history/list").toStringList(), this);

    //Prepare SQLite connection
    maindb = QSqlDatabase::addDatabase("QSQLITE");
    maindb.setHostName("localhost");
    maindb.setUserName("root");
    maindb.setPassword("");

    /* GUI */
    //Title
    setWindowTitle("Skype Richtext Mood Editor");

    //Filling the window
    setCentralWidget(initContent());
    disableEditing();
    resize(640, 390);

    //Centering the window on the current screen
    QDesktopWidget desktop_widget;
    QRect screen_geometry = desktop_widget.availableGeometry();
    move(screen_geometry.width() / 2 - width() / 2, screen_geometry.height() / 2 - height() / 2);

    /* Looking for main.db */
    if(!listMaindb())
    {
        QMessageBox::warning(this, tr("AppData/Skype not found"), tr("There is no Skype profile for this user."));
    }
}
int UI_Init(int argc, char **argv)
{
	initTranslator();

  uint32_t w,h;
    if(!g_thread_supported())
        g_thread_init(NULL);
    gdk_threads_init();
    gdk_threads_enter();
    gtk_set_locale();
    global_argc=argc;
    global_argv=argv;
      
    gtk_init(&global_argc, &global_argv);
    gdk_rgb_init();
    
    
}
Exemplo n.º 5
0
// Test that gl_FragDataEXT built-in usage in ESSL1 fragment shader is reflected in the output
// variables list. Also test that the precision is highp if user requests it.
TEST_F(CollectFragmentVariablesTest, OutputVarESSL1FragDepthHighp)
{
    const std::string &fragDepthHighShader =
        "#extension GL_EXT_frag_depth : require\n"
        "void main() {\n"
        "   gl_FragDepthEXT = 0.7;"
        "}\n";

    ShBuiltInResources resources    = mTranslator->getResources();
    resources.EXT_frag_depth        = 1;
    resources.FragmentPrecisionHigh = 1;
    initTranslator(resources);

    const sh::Attribute *outputVariable = nullptr;
    validateOutputVariableForShader(fragDepthHighShader, "gl_FragDepthEXT", &outputVariable);
    ASSERT_NE(outputVariable, nullptr);
    EXPECT_EQ(0u, outputVariable->arraySize);
    EXPECT_GLENUM_EQ(GL_FLOAT, outputVariable->type);
    EXPECT_GLENUM_EQ(GL_HIGH_FLOAT, outputVariable->precision);
}
Exemplo n.º 6
0
// Test that gl_FragData built-in usage in ESSL1 fragment shader is reflected in the output
// variables list.
TEST_F(CollectFragmentVariablesTest, OutputVarESSL1FragData)
{
    const std::string &fragDataShader =
        "#extension GL_EXT_draw_buffers : require\n"
        "precision mediump float;\n"
        "void main() {\n"
        "   gl_FragData[0] = vec4(1.0);\n"
        "   gl_FragData[1] = vec4(0.5);\n"
        "}\n";

    ShBuiltInResources resources       = mTranslator->getResources();
    resources.EXT_draw_buffers         = 1;
    const unsigned int kMaxDrawBuffers = 3u;
    resources.MaxDrawBuffers = kMaxDrawBuffers;
    initTranslator(resources);

    const sh::Attribute *outputVariable = nullptr;
    validateOutputVariableForShader(fragDataShader, "gl_FragData", &outputVariable);
    ASSERT_NE(outputVariable, nullptr);
    EXPECT_EQ(kMaxDrawBuffers, outputVariable->arraySize);
    EXPECT_GLENUM_EQ(GL_FLOAT_VEC4, outputVariable->type);
    EXPECT_GLENUM_EQ(GL_MEDIUM_FLOAT, outputVariable->precision);
}