Exemple #1
0
 uint64 DiShaderManager::CoverterFlags(const DiVector<DiString>& flags)
 {
     uint64 flag = 0;
     for(size_t i = 0; i < flags.size(); i++){
         MapNameFlagsIt it = mCommonFlag.find(flags[i]);
         if(it != mCommonFlag.end()){
             flag |= it->second;
         }
     }
     return flag;
 }
Exemple #2
0
 void DiEditorManager::Command_ToolOpen(const MyGUI::UString& _commandName, bool& _result)
 {
     void* wndHandle = DiBase::Driver->GetMainRenderWindow()->GetWindow()->GetWndHandle();
     
     DiVector<DiString> out;
     DiString filter = "XML effect file(fx)|*.fx|All files (*.*)|*.*";
     DiPathLib::OpenFileDialog(wndHandle, "Effect file", DiAssetManager::GetInstance().GetBasePath(), "", filter, 0, out);
     if (out.size() >= 1)
     {
         OpenFx(out[0]);
     }
     _result = true;
 }
Exemple #3
0
void UpdateScene()
{
    float time = DiBase::Driver->GetElapsedSecond();
    float rx = DiMath::Sin(time * 0.7f) * 0.2f;
    float ry = DiMath::Sin(time * 0.3f) * 0.1f;
    float rz = DiMath::Sin(time * 0.2f) * 0.1f;

    DiMat3 m;
    DiQuat rot;
    m.FromEulerAnglesXYZ(DiRadian(rx), DiRadian(ry), DiRadian(rz));
    rot.FromRotationMatrix(m);

    for (size_t i = 0; i < nodes.size(); i++)
        nodes[i]->SetOrientation(rot);
}
    void SetGameLocWindow::notifyBrowser(MyGUI::Widget* _sender)
    {
        if (_sender == mButtonBrwoser)
        {
            DiString outFolder;
            void* wndHandle = DiBase::Driver->GetMainRenderWindow()->GetWindow()->GetWndHandle();
#if DEMI_PLATFORM == DEMI_PLATFORM_OSX
            DiVector<DiString> out;
            DiString filter = "Mac Application(app)|*.app|All files (*.*)|*.*";
            DiPathLib::OpenFileDialog(wndHandle, "Game Application", DiPathLib::GetApplicationPath(), "", filter, 0, out);
            if (out.size() >= 1)
                mTextLocation->setCaption(out[0].c_str());
#else
            DiPathLib::OpenDirectoryDialog(wndHandle, "Game root directory", DiPathLib::GetApplicationPath(), outFolder);
            mTextLocation->setCaption(outFolder.c_str());
#endif
        }
    }
Exemple #5
0
 void DiEditorManager::SaveAll()
 {
     if (!mFxFileName.empty())
     {
         SaveAll(mFxFileName);
     }
     else
     {
         void* wndHandle = DiBase::Driver->GetMainRenderWindow()->GetWindow()->GetWndHandle();
         
         DiVector<DiString> out;
         DiString filter = "XML effect file(fx)|*.fx|All files (*.*)|*.*";
         DiPathLib::SaveFileDialog(wndHandle, "Effect file", DiPathLib::GetApplicationPath(), "", filter, 0, out);
         if (out.size() >= 1)
         {
             SaveAll(out[0]);
         }
     }
 }