Created
January 21, 2012 22:54
-
-
Save kayru/1654357 to your computer and use it in GitHub Desktop.
librush sample: hello world
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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