cf_app_signal_shutdown¶
Category: app
GitHub: cute_app.h
Call this to end your main-loop; makes cf_app_is_running return false.
Code Example¶
Creating a basic 640x480 window for your game.
#include <cute.h>
using namespace cute;
int main(int argc, const char argv)
{
// Create a window with a resolution of 640 x 480, along with a DirectX 11 context.
app_make("Fancy Window Title", 0, 50, 50, 640, 480, CF_APP_OPTIONS_D3D11_CONTEXT, argv[0]);
while (app_is_running())
{
app_update();
// All your game logic and updates go here...
if (my_game_should_quit()) {
// The next call to app_is_running() will return false.
cf_app_signal_shutdown();
}
app_draw_onto_screen();
}
app_destroy();
return 0;
}