环境:win7+vs2010
版本:2.2.2
在win32平台的环境中,是从传统的main函数开始执行的。打开cocos2d-x引擎根目录\projects\你的项目\proj.win32文件夹中的main.cpp
int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { #ifdef USE_WIN32_CONSOLE AllocConsole(); freopen("CONIN$", "r", stdin); freopen("CONOUT$", "w", stdout); freopen("CONOUT$", "w", stderr); #endif UNREFERENCED_PARAMETER(hPrevInstance); UNREFERENCED_PARAMETER(lpCmdLine); // create the application instance AppDelegate app; CCEGLView* ag官方网站eglView = CCEGLView::sharedOpenGLView(); eglView->setViewName("TestDemo"); eglView->setFrameSize(720, 480); int ret = CCApplication::sharedApplication()->run(); #ifdef USE_WIN32_CONSOLE FreeConsole(); #endif return ret; }
AppDelegate app;然后创建OpenGL的窗口
CCEGLView* eglView = CCEGLView::sharedOpenGLView(); eglView->setViewName("TestDemo"); eglView->setFrameSize(720, 480);
最后调用run函数,开始运行cocos2d-x游戏。
int ret = CCApplication::sharedApplication()->run();
http://www.bkjia.com/Androidjc/778986.htmlwww.bkjia.comtruehttp://www.bkjia.com/Androidjc/778986.htmlTechArticle环境:win7vs2010 版本:2.2.2 在win32平台的环境中,是从传统的main函数开始执行的。打开cocos2d-x引擎根目录\projects\你的项目\proj.win32文件夹中...
本文源自: AG环亚游戏
下一篇:没有了