summaryrefslogtreecommitdiffstats
path: root/src/main.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/main.zig b/src/main.zig
index 79dab91..ba1c92e 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -6,17 +6,21 @@ const debug_gl = @import("debug_gl.zig");
const glfw_impl = @import("glfw_impl.zig");
const gl3_impl = @import("gl3_impl.zig");
-extern fn errorCallback(err: c_int, description: [*c]const u8) void {
- panic("Error: {}\n", description);
+fn errorCallback(err: c_int, description: [*c]const u8) callconv(.C) void {
+ panic("Error: {}\n", .{ description });
}
var window: *c.GLFWwindow = undefined;
+fn handleStuff(path: [*c]const u8, x: i32, y: i32) callconv(.C) bool {
+ return true;
+}
+
pub fn main() !void {
_ = c.glfwSetErrorCallback(errorCallback);
if (c.glfwInit() == c.GL_FALSE) {
- panic("GLFW init failure\n");
+ panic("GLFW init failure\n", .{});
}
defer c.glfwTerminate();
@@ -31,8 +35,8 @@ pub fn main() !void {
const window_width = 640;
const window_height = 480;
- window = c.glfwCreateWindow(window_width, window_height, c"ImGUI Test", null, null) orelse {
- panic("unable to create window\n");
+ window = c.glfwCreateWindow(window_width, window_height, "ImGUI Test", null, null) orelse {
+ panic("unable to create window\n", .{});
};
defer c.glfwDestroyWindow(window);
@@ -43,9 +47,9 @@ pub fn main() !void {
defer c.igDestroyContext(context);
const io = c.igGetIO();
- io.*.ConfigFlags |= @enumToInt(c.ImGuiConfigFlags_NavEnableKeyboard);
- // io.*.ConfigFlags |= @enumToInt(c.ImGuiConfigFlags_DockingEnable);
- // io.*.ConfigFlags |= @enumToInt(c.ImGuiConfigFlags_ViewportsEnable);
+ io.*.ConfigFlags |= c.ImGuiConfigFlags_NavEnableKeyboard;
+ io.*.ConfigFlags |= c.ImGuiConfigFlags_DockingEnable;
+ // io.*.ConfigFlags |= c.ImGuiConfigFlags_ViewportsEnable;
const style = c.igGetStyle();
c.igStyleColorsDark(style);