本文整理汇总了C++中CCEGLView::setViewName方法的典型用法代码示例。如果您正苦于以下问题:C++ CCEGLView::setViewName方法的具体用法?C++ CCEGLView::setViewName怎么用?C++ CCEGLView::setViewName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCEGLView
的用法示例。
在下文中一共展示了CCEGLView::setViewName方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _tWinMain
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
#ifdef USE_WIN32_CONSOLE
AllocConsole();
freopen("CONIN$", "r", stdin);
freopen("CONOUT$", "w", stdout);
freopen("CONOUT$", "w", stderr);
#endif
// create the application instance
AppDelegate app;
CCEGLView* eglView = CCEGLView::sharedOpenGLView();
eglView->setViewName("FFQ");
eglView->setFrameSize(640, 960);
int ret = CCApplication::sharedApplication()->run();
#ifdef USE_WIN32_CONSOLE
FreeConsole();
#endif
return ret;
}
示例2: CCEGLView
MainPage::MainPage()
{
InitializeComponent();
// Note AppDelegate is in MainPage.xaml.h
CCEGLView* eglView = new CCEGLView();
eglView->Create(Window::Current->CoreWindow, SwapChainPanel);
eglView->setViewName("TestCpp");
CCApplication::sharedApplication()->run();
}
示例3: main
int main(int argc, char **argv)
{
// create the application instance
AppDelegate app;
CCEGLView* eglView = CCEGLView::sharedOpenGLView();
eglView->setFrameSize(480, 800);
eglView->setViewName("2048");
return CCApplication::sharedApplication()->run();
}
示例4: _tWinMain
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
// create the application instance
AppDelegate app;
CCEGLView* eglView = CCEGLView::sharedOpenGLView();
eglView->setViewName("netsample");
eglView->setFrameSize(480, 320);
return CCApplication::sharedApplication()->run();
}
示例5: _tWinMain
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
// create the application instance
AppDelegate app;
CCEGLView* eglView = CCEGLView::sharedOpenGLView();
eglView->setViewName("MiniGame");
eglView->setFrameSize(SCREEN_WIDTH, SCREEN_HEIGHT);
eglView->setFrameZoomFactor(0.5);
return CCApplication::sharedApplication()->run();
}
示例6: _tWinMain
//-------------------------------------------------------------------------
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON1));
AppDelegate app;
CCEGLView* eglView = CCEGLView::sharedOpenGLView();
eglView->setViewName(A2U("FKImageTool图片格式转译&查看工具").c_str());
eglView->setFrameSize(1624, 1024);
eglView->setFrameZoomFactor(0.8f);
return CCApplication::sharedApplication()->run();
}
示例7: _tWinMain
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
UNREFERENCED_PARAMETER(hPrevInstance);//该宏用于通知编译器不用检测变量是否使用
UNREFERENCED_PARAMETER(lpCmdLine);
// create the application instance
AppDelegate app;
CCEGLView* eglView = CCEGLView::sharedOpenGLView();
eglView->setViewName("Airplane");
eglView->setFrameSize(320, 480);
//eglView->setFrameZoomFactor(0.4f);
return CCApplication::sharedApplication()->run();
}
示例8: _tWinMain
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
// create the application instance
AppDelegate app;
CCEGLView* eglView = CCEGLView::sharedOpenGLView();
eglView->setViewName("ChineseChess");
eglView->setFrameSize(1080, 1500);
// The resolution of ipad3 is very large. In general, PC's resolution is smaller than it.
// So we need to invoke 'setFrameZoomFactor'(only valid on desktop(win32, mac, linux)) to make the window smaller.
eglView->setFrameZoomFactor(0.5f);
return CCApplication::sharedApplication()->run();
}
示例9: _tWinMain
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
// create the application instance
AppDelegate app;
CCEGLView* eglView = CCEGLView::sharedOpenGLView();
eglView->setViewName("Test");
eglView->setFrameSize(750, 1334);
CCApplication::sharedApplication()->setResourceRootPath("../../Resources");
return CCApplication::sharedApplication()->run();
}
示例10: _tWinMain
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
// create the application instance
AppDelegate app;
CCEGLView* eglView = CCEGLView::sharedOpenGLView();
eglView->setViewName("2048");
eglView->setFrameSize(1080, 1920);
//eglView->setFrameSize(400, 640);
//eglView->setFrameSize(400, 640);
eglView->setFrameZoomFactor(0.4f);//ÉèÖÃÆÁÄ»Ëõ·Å±ÈÀý
return CCApplication::sharedApplication()->run();
}
示例11: _tWinMain
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
// create the application instance
AppDelegate app;
CCEGLView* eglView = CCEGLView::sharedOpenGLView();
eglView->setViewName("FacebookPlugin");
int nSimW = CIniMgr::GetInstance()->GetValue(DEBUG_INI, "Sim", "Width", 480);
int nSimH = CIniMgr::GetInstance()->GetValue(DEBUG_INI, "Sim", "Height", 720);
eglView->setFrameSize(nSimW, nSimH);
return CCApplication::sharedApplication()->run();
}
示例12: SIGNAL
void Cocos2dxView::initCocos2dx()
{
HWND hwnd = (HWND)this->winId();
CCEGLView *eglView = CCEGLView::sharedOpenGLView(hwnd);
eglView->setViewName("cocos2dx_view");
eglView->setFrameSize(defaultSizeX, defaultSizeY);
this->setGeometry(0, 0, defaultSizeX, defaultSizeY);
CCApplication::sharedApplication()->run(false);
cocos2d::CCScene *sc = CCDirector::sharedDirector()->getRunningScene();
//先运行一帧,保证当前运行场景不为空
CCDirector::sharedDirector()->mainLoop();
m_timer.setParent(this);
connect(&m_timer, SIGNAL(timeout()), this, SLOT(renderCocos2dx()));
m_timer.start();
}
示例13: _tWinMain
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
setProcessEncoding(encode_utf8);
UNREFERENCED_PARAMETER(hPrevInstance);
//UNREFERENCED_PARAMETER(lpCmdLine);
char sz[128];
WideCharToMultiByte( CP_ACP, 0, lpCmdLine, -1,
sz, 127, NULL, NULL );
GameRoot::getSingleton().ParseCmd(sz);
// create the application instance
AppDelegate app;
CCEGLView* eglView = CCEGLView::sharedOpenGLView();
eglView->setViewName("HelloCpp");
eglView->setFrameSize(1024, 768);
return CCApplication::sharedApplication()->run();
}
示例14: _tWinMain
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
#ifdef _DEBUG
AllocConsole();
freopen("CONIN$", "r", stdin);
freopen("CONOUT$", "w", stdout);
freopen("CONOUT$", "w", stderr);
#endif
if (lpCmdLine && lpCmdLine[0])
{
string filename = lpCmdLine;
filename.erase(std::remove(filename.begin(),filename.end(),'\"'),filename.end());
CCUserDefault::sharedUserDefault()->setStringForKey("ScriptEntry", filename.c_str());
}
// create the application instance
AppDelegate app;
CCEGLView* eglView = CCEGLView::sharedOpenGLView();
eglView->setViewName("Dorothy");
SetClassLong(eglView->getHWnd(), GCL_HICON, (long)LoadIcon(hInstance, MAKEINTRESOURCE(IDR_MAINFRAME)));
int width = CCUserDefault::sharedUserDefault()->getIntegerForKey("Width");
int height = CCUserDefault::sharedUserDefault()->getIntegerForKey("Height");
if (width == 0 || height == 0)
{
width = 800;
height = 600;
CCUserDefault::sharedUserDefault()->setIntegerForKey("Width", width);
CCUserDefault::sharedUserDefault()->setIntegerForKey("Height", height);
}
eglView->setFrameSize(CCSize(width, height));
int ret = CCApplication::sharedApplication()->run();
#if defined(_DEBUG)
FreeConsole();
#endif
return ret;
}
示例15: MInitializeApplication
MEDUSA_EXPORT_API bool MInitializeApplication( HWND hwnd )
{
cocos2d::CCEGLView::SetParentHwnd(hwnd);
// create the application instance
AppDelegate app;
CCEGLView* eglView = CCEGLView::sharedOpenGLView();
eglView->setViewName("HelloCpp");
eglView->setFrameSize(960, 640);
// The resolution of ipad3 is very large. In general, PC's resolution is smaller than it.
// So we need to invoke 'setFrameZoomFactor'(only valid on desktop(win32, mac, linux)) to make the window smaller.
eglView->setFrameZoomFactor(1);
CCApplication::sharedApplication()->run();
return true;
}