コード例 #1
0
ファイル: Launch.cpp プロジェクト: SebastienLussier/Gamedesk
    void SetupWindows()
    {
        mMainWindow = GD_NEW(Win32Window, this, "Launch::Gamedesk");
        mMainWindow->Init( "Gamedesk", 800, 600, true, false );
        
        RenderWindow::WindowInfo windowInfo;
        windowInfo.mWindowInternal = (Handle)mMainWindow;
        windowInfo.mWindowHandle   = (Handle)mMainWindow->GetHandle();
        windowInfo.mFullscreen     = mMainWindow->IsFullScreen();
        windowInfo.mSize           = mMainWindow->GetClientSize();
        
        RenderTarget::Format targetFormat;
        targetFormat.mAlpha        = true;
        targetFormat.mDepth        = true;
        targetFormat.mDoubleBuffer = true;
        targetFormat.mStencil      = true;
        targetFormat.mStereo       = false;

        Class* renderWindowClass = ModuleManager::Instance()->LoadClass( "Win32OGLRenderWindow.Win32OGLRenderWindow" );
        mRenderWindow = Cast<RenderWindow>( renderWindowClass->AllocateNew() );
        mRenderWindow->Create( windowInfo, targetFormat );
        mLastTime = SystemInfo::Instance()->GetSeconds();
    }