From 2bc13cd7d886710590f606b2df012e88a4926696 Mon Sep 17 00:00:00 2001 From: Able Date: Tue, 15 Oct 2024 18:06:33 -0500 Subject: [PATCH] fix :thumbsup: --- sysdata/programs/horizon/src/main.hb | 2 +- .../horizon_testing_program/src/main.hb | 28 ++++++++++--------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/sysdata/programs/horizon/src/main.hb b/sysdata/programs/horizon/src/main.hb index 9fc340a..9c02982 100644 --- a/sysdata/programs/horizon/src/main.hb +++ b/sysdata/programs/horizon/src/main.hb @@ -39,7 +39,7 @@ main := fn(): int { // TODO: Get windows out of a collection and iter through // { - render.clear(window, render.white) + render.clear(window, color) // Apply the image to the screen render.put_surface(screen, window, pos) diff --git a/sysdata/programs/horizon_testing_program/src/main.hb b/sysdata/programs/horizon_testing_program/src/main.hb index b8f9316..60650e1 100644 --- a/sysdata/programs/horizon_testing_program/src/main.hb +++ b/sysdata/programs/horizon_testing_program/src/main.hb @@ -8,28 +8,30 @@ ignim := @use("../../../libraries/ignim/src/lib.hb"); .{errors} := ignim main := fn(): int { - windowing_system_buffer := buffer.search("XHorizon\0") + x := 0 + loop if x > 1000000 break else x += 1 + windowing_system_buffer := buffer.search("XHorizon\0") // TODO: get WindowID create_window(windowing_system_buffer) - // program_name := "Horizon Testing Program\0" - // program_version := ignim.version.make_version(0, 1, 0) - // engine_name := "None\0" - // engine_version := ignim.version.make_version(0, 0, 0) - // api_version := ignim.version.make_api_version(0, 1, 0, 0) + program_name := "Horizon Testing Program\0" + program_version := ignim.version.make_version(0, 1, 0) + engine_name := "None\0" + engine_version := ignim.version.make_version(0, 0, 0) + api_version := ignim.version.make_api_version(0, 1, 0, 0) - // app_info := ignim.application.new_application_info(program_name, program_version, engine_name, engine_version, api_version) + app_info := ignim.application.new_application_info(program_name, program_version, engine_name, engine_version, api_version) - // create_info := ignim.instance.new_create_info(&app_info) + create_info := ignim.instance.new_create_info(&app_info) - // instance := ignim.instance.void_instance() + instance := ignim.instance.void_instance() // // TODO: recursively follow this https://vulkan-tutorial.com/Drawing_a_triangle/Setup/Instance - // ret := ignim.instance.create_instance(&create_info, 0, &instance) - // if ret == errors.IncompatibleDriver { - // log.error("Driver Incompatible with Vulkan\0") - // } + ret := ignim.instance.create_instance(&create_info, 0, &instance) + if ret == errors.IncompatibleDriver { + // log.error("Driver Incompatible with Vulkan\0") + } return 0 } \ No newline at end of file