Projects > cpp > Issues > Feature #297

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

move the window creation for multi-platforms into engine internal

Feature #297 [Closed]
walzer@cocos2d-x.org 2010-12-29 21:48 . Updated over 12 years ago

read this post http://www.cocos2d-x.org/boards/6/topics/272

// init the window
#if defined(CCX_PLATFORM_UPHONE)
    if (!(m_pMainWnd = new CCXEGLView(this)) || 
        ! m_pMainWnd->Create(&TRectangle(0,0,GetScreenWidth(),GetScreenHeight())))
#elif defined(CCX_PLATFORM_WIN32)
    if (! (m_pMainWnd = new CCXEGLView()) ||
        ! m_pMainWnd->Create(L"HelloWorld", 320, 480))
#elif defined(CCX_PLATFORM_IPHONE)
    if (! (m_pMainWnd = new CCXEGLView() ) ) 
#elif defined(CCX_PLATFORM_ANDROID)
        if (!(m_pMainWnd = CCDirector::sharedDirector()->getOpenGLView()))
#else
    #error
#endif
{
        delete m_pMainWnd;
        return false;
}

don’t leave this code to games.

walzer@cocos2d-x.org 2010-12-29 21:59
  • Subject changed from move the window creation codes into engine internal to move the window creation for multi-platforms into engine internal
walzer@cocos2d-x.org 2011-01-28 18:26
  • Estimated time set to 4.00
walzer@cocos2d-x.org 2011-01-28 18:27
  • Target version set to cocos2d-0.99.5-x-0.8.0
walzer@cocos2d-x.org 2011-03-04 23:57
  • Assignee set to yangws
yangws 2011-03-04 23:59
  • Due date set to 2011-03-05
  • Status changed from New to Closed

duplicate with #365

walzer@cocos2d-x.org 2012-05-25 08:18
  • Project changed from cocos2d-x to cpp
  • Target version deleted (cocos2d-0.99.5-x-0.8.0)

Atom PDF

Status:Closed
Start date:2010-12-29
Priority:Normal
Due date:2011-03-05
Assignee:yangws
% Done:

0%

Category:-
Target version:-
Estimated time:4.00 points