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


C++ Application::Draw方法代码示例

本文整理汇总了C++中Application::Draw方法的典型用法代码示例。如果您正苦于以下问题:C++ Application::Draw方法的具体用法?C++ Application::Draw怎么用?C++ Application::Draw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Application的用法示例。


在下文中一共展示了Application::Draw方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Draw

void Level::Draw(Application &App) {

    if(m_exit) {
        return;
    }

    // Clear screen
    App.Clear();

    // Draw the panels into the buffer
    m_gui.Draw(App);

    App.Draw(sf::Shape::Rectangle(0, 50.0f, 860.0f, 580.0f, sf::Color(0, 0, 0, 130)));

    // If we have a menu pop up, draw it
    if(m_active_menu) {

        // Tints the background panels using a black transparent rectangle that covers the whole screen
        App.Draw(sf::Shape::Rectangle(0, 0, App.GetWidth(), App.GetHeight(), sf::Color(0, 0, 0, 230)));

        // draw active menu on top of the tinted panels
        m_active_menu->Draw(App);
    }

    // Finally, display the buffered frame on screen
    App.Display();
}
开发者ID:andressbarajas,项目名称:Isla-Vista-Tower-Defense,代码行数:27,代码来源:cLevel.cpp

示例2: wWinMain

int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow)
{
    UNREFERENCED_PARAMETER(hPrevInstance);
    UNREFERENCED_PARAMETER(lpCmdLine);

	Application * theApp = new Application();

	if (FAILED(theApp->Initialise(hInstance, nCmdShow)))
	{
		return -1;
	}

    // Main message loop
    MSG msg = {0};

    while (WM_QUIT != msg.message)
    {
        if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
        {
            TranslateMessage(&msg);
            DispatchMessage(&msg);
        }
        else
        {
			theApp->Update();
            theApp->Draw();
        }
    }

	delete theApp;
	theApp = nullptr;

    return (int) msg.wParam;
}
开发者ID:LpxHiggsy,项目名称:FGGSDirectX,代码行数:34,代码来源:DX11.Framework.cpp

示例3: Draw

void MultiBullet::Draw(Application &App){

    if(m_last_pulse + CLOCKS_PER_SEC < clock())
    {
        App.Draw(m_circ);
    }
    else{
        return;
    }

}
开发者ID:andressbarajas,项目名称:Isla-Vista-Tower-Defense,代码行数:11,代码来源:cMultiBullet.cpp

示例4: main

int main()
{
	Application game = Application();
	game.Create( "My Awesome Game", 1270, 720, 32, false );

	while( game.isRunning())
	{
		game.Update();
		game.Draw();
	}
	return 0;
}
开发者ID:ChrisMelling,项目名称:basicGame,代码行数:12,代码来源:Main.cpp

示例5: wWinMain

int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow)
{
    UNREFERENCED_PARAMETER(hPrevInstance);
    UNREFERENCED_PARAMETER(lpCmdLine);

	Application * theApp = new Application();

	if (FAILED(theApp->Initialise(hInstance, nCmdShow)))
	{
		return -1;
	}

    // Main message loop
    MSG msg = {0};

    while (WM_QUIT != msg.message)
    {
        if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
        {
			bool handled = false;

			if (msg.message >= WM_KEYFIRST && msg.message <= WM_KEYLAST)
			{
				handled = theApp->HandleKeyboard(msg);
			}
			else if (WM_QUIT == msg.message)
				break;

			if (!handled)
			{
				TranslateMessage(&msg);
				DispatchMessage(&msg);
			}
        }
		else
		{
			theApp->Update();
			theApp->Draw();
			Sleep(20);
		}
    }

	delete theApp;
	theApp = nullptr;

    return (int) msg.wParam;
}
开发者ID:GRMaverick,项目名称:FGGC_Physics_Tutorial,代码行数:47,代码来源:Main.cpp

示例6: main

int main()
{
	Application* app = new Application;
	app->Startup();


	//staff->LoadObject("./data/Models/soulspear/soulspear.obj", "./data/Models/soulspear/soulspear_diffuse.tga");
	//dragon->LoadObject("./data/Models/Dragon/Dragon.obj");




	

	while (glfwWindowShouldClose(app->windowView->m_window) == false &&
		glfwGetKey(app->windowView->m_window, GLFW_KEY_ESCAPE) != GLFW_PRESS) {

		app->Update();
		app->Draw();
	}
	
	app->Shutdown();
	return 0;
}
开发者ID:BenjaminMatthewMoore,项目名称:Virtual,代码行数:24,代码来源:main.cpp

示例7: Draw

void QuitGame::Draw(Application &App) {
    App.Draw(*this);
    m_banner.Draw(App);
}
开发者ID:andressbarajas,项目名称:Isla-Vista-Tower-Defense,代码行数:4,代码来源:cQuit.cpp

示例8: Draw

void TowerButton::Draw(Application &App) {
    App.Draw(*this);

	subDraw(App);
}
开发者ID:andressbarajas,项目名称:Isla-Vista-Tower-Defense,代码行数:5,代码来源:cTowerButton.cpp

示例9: Draw

void HomeBase::Draw(Application &App) {
     App.Draw(*this);

     m_health.Draw(App);
}
开发者ID:andressbarajas,项目名称:Isla-Vista-Tower-Defense,代码行数:5,代码来源:cHomeBase.cpp

示例10: Draw

void Banner::Draw(Application &App) {

	App.Draw(*this);

	SpriteObj::subDraw(App);
}
开发者ID:andressbarajas,项目名称:Isla-Vista-Tower-Defense,代码行数:6,代码来源:cBanner.cpp


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