update samples with title/window size

This commit is contained in:
Reuben Dunnington 2023-08-23 13:08:09 -07:00
parent d4cb93c61a
commit 81712c14c1
Signed by: rdunnington
GPG Key ID: 3D57C8938EA08E90
5 changed files with 12 additions and 0 deletions

View File

@ -19,6 +19,9 @@ f32 minf(f32 a, f32 b);
ORCA_EXPORT void oc_on_init(void)
{
oc_runtime_window_set_title(OC_STR8("clock"));
oc_runtime_window_set_size(400, 400);
surface = oc_surface_canvas();
canvas = oc_canvas_create();

View File

@ -615,6 +615,8 @@ ORCA_EXPORT void oc_on_init()
{
oc_log_info("Hello, world (from C)");
oc_runtime_window_set_title(OC_STR8("fluid"));
surface = oc_surface_gles();
oc_surface_select(surface);

View File

@ -37,6 +37,9 @@ void compile_shader(GLuint shader, const char* source)
ORCA_EXPORT void oc_on_init(void)
{
oc_runtime_window_set_title(OC_STR8("triangle"));
oc_runtime_window_set_size(640, 480);
surface = oc_surface_gles();
oc_surface_select(surface);

View File

@ -69,6 +69,8 @@ oc_str8 loadFile(oc_arena* arena, oc_str8 filename)
ORCA_EXPORT void oc_on_init(void)
{
oc_runtime_window_set_title(OC_STR8("pong"));
surface = oc_surface_canvas();
canvas = oc_canvas_create();

View File

@ -10,6 +10,8 @@ oc_arena textArena = { 0 };
ORCA_EXPORT void oc_on_init(void)
{
oc_runtime_window_set_title(OC_STR8("ui"));
surface = oc_surface_canvas();
canvas = oc_canvas_create();
oc_ui_init(&ui);