本文整理汇总了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();
}
示例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;
}
示例3: Draw
void MultiBullet::Draw(Application &App){
if(m_last_pulse + CLOCKS_PER_SEC < clock())
{
App.Draw(m_circ);
}
else{
return;
}
}
示例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;
}
示例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;
}
示例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;
}
示例7: Draw
void QuitGame::Draw(Application &App) {
App.Draw(*this);
m_banner.Draw(App);
}
示例8: Draw
void TowerButton::Draw(Application &App) {
App.Draw(*this);
subDraw(App);
}
示例9: Draw
void HomeBase::Draw(Application &App) {
App.Draw(*this);
m_health.Draw(App);
}
示例10: Draw
void Banner::Draw(Application &App) {
App.Draw(*this);
SpriteObj::subDraw(App);
}