make glfw work on Windows

pull/1092/head
Alexander Medvednikov 2019-07-12 05:04:04 +02:00
parent 560ba55572
commit 28d379dc7b
3 changed files with 15 additions and 8 deletions

View File

@ -1 +1,12 @@
<img src='https://raw.githubusercontent.com/vlang/v/master/examples/tetris/screenshot.png' width=300> <img src='https://raw.githubusercontent.com/vlang/v/master/examples/tetris/screenshot.png' width=300>
Tetris has a temporary dependency on GLFW.
## macOS
`brew install glfw`
## Ubuntu
sudo apt install libglfw3 libglfw3-dev
## Windows
Copy `thirdparty/glfw/glfw3.dll` to this directory.

View File

@ -5,23 +5,19 @@
module glfw module glfw
#flag -I @VROOT/thirdparty/glfw #flag -I @VROOT/thirdparty/glfw
#flag -L @VROOT/thirdparty/glfw
#flag windows @VROOT/thirdparty/glfw/libglfw3.a
// Debugging a custom build // Debugging a custom build
#flag darwin -L/var/tmp/glfw/src/ //-#flag darwin -L/var/tmp/glfw/src/
#flag darwin -lglfw #flag darwin -lglfw
#flag linux -lglfw #flag linux -lglfw
#flag windows -I/usr/local/Cellar/glfw/3.2.1/include/ #flag windows -lglfw3
// #include <glad/glad.h> // !gen.go include GLFW.v
#include <GLFW/glfw3.h> #include <GLFW/glfw3.h>
// #flag darwin -framework Carbon // #flag darwin -framework Carbon
// #flag darwin -framework Cocoa // #flag darwin -framework Cocoa
// #flag darwin -framework CoreVideo // #flag darwin -framework CoreVideo
// #flag darwin -framework IOKit // #flag darwin -framework IOKit
// struct C.GL
// @GLFWwindow* C.glfwCreateWindow
// #int gconst_init = 0;
const ( const (
RESIZABLE = 1 RESIZABLE = 1
DECORATED = 2 DECORATED = 2