mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
17 lines
359 B
Go
17 lines
359 B
Go
|
module gl
|
||
|
|
||
|
// #include <OpenGL/gl.h>
|
||
|
// #flag -framework OpenGL
|
||
|
#include "glad.h"
|
||
|
#include "glad.c"
|
||
|
fn init_glad() {
|
||
|
println('init_glad() win')
|
||
|
// # ok= gladLoadGLLoader((GLADloadproc) glfwGetProcAddress);
|
||
|
ok := C.gladLoadGL()
|
||
|
if !ok {
|
||
|
os.exit('Failed to initialize glad OpenGL context')
|
||
|
}
|
||
|
// C.printf("initglad test: glClear ADDR=%p\n', glClear);
|
||
|
}
|
||
|
|