glfw: macOS cross compilation with automatic setup
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
91be49b733
commit
bba27cf1aa
2 changed files with 61 additions and 13 deletions
|
|
@ -8,14 +8,13 @@ pub fn basicTest() void {
|
|||
@panic("failed to init");
|
||||
}
|
||||
const window = c.glfwCreateWindow(640, 480, "GLFW example", null, null);
|
||||
if (window == null)
|
||||
{
|
||||
if (window == null) {
|
||||
c.glfwTerminate();
|
||||
@panic("failed to create window");
|
||||
}
|
||||
|
||||
var start = std.time.milliTimestamp();
|
||||
while (std.time.milliTimestamp() < start+3000 and c.glfwWindowShouldClose(window) != c.GLFW_TRUE) {
|
||||
while (std.time.milliTimestamp() < start + 3000 and c.glfwWindowShouldClose(window) != c.GLFW_TRUE) {
|
||||
c.glfwPollEvents();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue