当前位置: 首页>>代码示例>>C++>>正文


C++ CCEGLView::setViewName方法代码示例

本文整理汇总了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;
}
开发者ID:huaqiangs,项目名称:FFQ,代码行数:29,代码来源:main.cpp

示例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();
}
开发者ID:joewan,项目名称:cocos2d-x,代码行数:9,代码来源:MainPage.xaml.cpp

示例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();
}
开发者ID:guoyingbo,项目名称:Game2048,代码行数:10,代码来源:main.cpp

示例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();
}
开发者ID:SatoshiKawabata,项目名称:nativeacademy,代码行数:15,代码来源:main.cpp

示例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();
}
开发者ID:renshengqiang,项目名称:MiniGame,代码行数:16,代码来源:main.cpp

示例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();
}
开发者ID:duzhi5368,项目名称:FKCocos2dxWrapper_2.x,代码行数:17,代码来源:main.cpp

示例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();
}
开发者ID:rzzz,项目名称:cocosAirPlane,代码行数:18,代码来源:main.cpp

示例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();
}
开发者ID:guoyingbo,项目名称:ChineseChess,代码行数:18,代码来源:main.cpp

示例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();
}
开发者ID:WoYang,项目名称:CrossApp,代码行数:18,代码来源:main.cpp

示例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();
}
开发者ID:dave5177,项目名称:share,代码行数:18,代码来源:main.cpp

示例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();
}
开发者ID:TianXinGe,项目名称:FacebookPlugin,代码行数:19,代码来源:main.cpp

示例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();
}
开发者ID:cubemoon,项目名称:SceneEditor-1,代码行数:19,代码来源:Cocos2dxView.cpp

示例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();
}
开发者ID:joyfish,项目名称:zgc,代码行数:19,代码来源:main.cpp

示例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;
}
开发者ID:lovoror,项目名称:Dorothy,代码行数:42,代码来源:main.cpp

示例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;
	}
开发者ID:oOFlyOo,项目名称:Cocos2d-x-ParticleEditor-for-Windows,代码行数:20,代码来源:ExportAPI.cpp


注:本文中的CCEGLView::setViewName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。