Skip to content

Instantly share code, notes, and snippets.

@kayru
Created January 21, 2012 22:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kayru/1654357 to your computer and use it in GitHub Desktop.
Save kayru/1654357 to your computer and use it in GitHub Desktop.
librush sample: hello world
#include <Rush/Rush.h>
#include <Rush/Platform.h>
#include <stdio.h>
using namespace Rush;
RushAppConfig g_appConfig;
static void startup(RushPlatformContext* context)
{
printf("startup\n");
R_UNUSED(context);
}
static void shutdown(RushPlatformContext* context)
{
printf("shutdown\n");
R_UNUSED(context);
}
static void draw(RushPlatformContext* context)
{
R_UNUSED(context);
}
int main()
{
RushAppConfig_Init(&g_appConfig);
g_appConfig.on_startup = startup;
g_appConfig.on_shutdown = shutdown;
g_appConfig.on_draw = draw;
g_appConfig.name = "Hello World";
g_appConfig.width = 800;
g_appConfig.height = 600;
return RushPlatform_Run(&g_appConfig);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment