mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
tetris improvements
added getexepath() to os module added some wrapper functions to glfw removed hardcored path in gg module better tetris example exit and resource loading
This commit is contained in:
committed by
Alexander Medvednikov
parent
84f5d7e64b
commit
bed7440ebb
12
glfw/glfw.v
12
glfw/glfw.v
@@ -135,6 +135,14 @@ pub fn init() {
|
||||
# glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
|
||||
}
|
||||
|
||||
pub fn (w &Window) destroy() {
|
||||
C.glfwDestroyWindow(w.data)
|
||||
}
|
||||
|
||||
pub fn terminate() {
|
||||
C.glfwTerminate()
|
||||
}
|
||||
|
||||
// pub fn mouse_move(w * GLFWwindow, x, y double) {
|
||||
pub fn mouse_move(w voidptr, x, y f64) {
|
||||
// #printf("%f : %f => %d \n", x,y);
|
||||
@@ -203,6 +211,10 @@ pub fn poll_events() {
|
||||
C.glfwPollEvents()
|
||||
}
|
||||
|
||||
pub fn set_should_close(w voidptr, close bool) {
|
||||
C.glfwSetWindowShouldClose(w, close)
|
||||
}
|
||||
|
||||
pub fn (w &Window) should_close() bool {
|
||||
// ChatsRepo
|
||||
return C.glfwWindowShouldClose(w.data)
|
||||
|
||||
Reference in New Issue
Block a user