Reputation: 11
I'm trying to rewrite a program in Zig, but I don't know how to use pointer cast. I tried to use @as
, but apparently that's wrong.
fn framebufferResizeCallback(window: ?*cInclude.GLFWwindow, _: c_int, _: c_int) callconv(.C) void {
var app = @as(*HelloTriangleApplication, cInclude.glfwGetWindowUserPointer(window));
app.framebufferResized = true;
}
How can I fix this?
Upvotes: 1
Views: 1805