コード例 #1
0
ファイル: plugin.cpp プロジェクト: 87maxi/oom
void BasePlugin::showGui(bool yesno)
{
    if (yesno)
    {
        if (! m_gui)
            makeGui();

        m_gui->show();
    }
    else
    {
        if (m_gui)
            m_gui->hide();
    }
}
コード例 #2
0
ファイル: main.cpp プロジェクト: jackpoz/G3D-backup
void App::onInit() {
    GApp::onInit();
    createDeveloperHUD();
	renderDevice->setSwapBuffersAutomatically(true);

    window()->setCaption("Pixel Shader Demo");
        
    ArticulatedModel::Specification spec;
    spec.filename = System::findDataFile("teapot/teapot.obj");
    spec.scale = 0.015f;
    spec.stripMaterials = true;
    spec.preprocess.append(ArticulatedModel::Instruction(Any::parse("setCFrame(root(), Point3(0, -0.5, 0));")));
    model = ArticulatedModel::create(spec);

    makeLighting();
    makeColorList();
    makeGui();

    // Color 1 is red
    lambertianColorIndex = 1;
    // The last color is white
    glossyColorIndex = colorList.size() - 1;
    
    m_debugCamera->setPosition(Vector3(1.0f, 1.0f, 2.5f));
    m_debugCamera->setFieldOfView(45 * units::degrees(), FOVDirection::VERTICAL);
    m_debugCamera->lookAt(Point3::zero());

    // Add axes for dragging and turning the model
    manipulator = ThirdPersonManipulator::create();
    addWidget(manipulator);

    // Turn off the default first-person camera controller and developer UI
    m_debugController->setEnabled(false);
    developerWindow->setVisible(false);
    developerWindow->cameraControlWindow->setVisible(false);
    showRenderingStats = false;
}