2020-01-17 20:05:45 +01:00
|
|
|
module c
|
|
|
|
|
|
|
|
pub const (
|
|
|
|
used_import = 1
|
|
|
|
)
|
|
|
|
|
|
|
|
#flag -I @VROOT/thirdparty/sokol
|
|
|
|
#flag -I @VROOT/thirdparty/sokol/util
|
|
|
|
|
|
|
|
#flag darwin -fobjc-arc
|
2020-08-23 21:17:05 +02:00
|
|
|
#flag linux -lX11 -lGL -lXcursor -lXi
|
2020-01-17 20:05:45 +01:00
|
|
|
|
2020-01-18 06:27:39 +01:00
|
|
|
#flag windows -lgdi32
|
|
|
|
|
2020-01-17 20:05:45 +01:00
|
|
|
// METAL
|
2020-01-21 03:22:18 +01:00
|
|
|
#flag darwin -DSOKOL_METAL
|
|
|
|
#flag darwin -framework Metal -framework Cocoa -framework MetalKit -framework QuartzCore
|
2020-01-17 20:05:45 +01:00
|
|
|
|
|
|
|
// OPENGL
|
2020-01-21 03:22:18 +01:00
|
|
|
#flag linux -DSOKOL_GLCORE33
|
|
|
|
//#flag darwin -framework OpenGL -framework Cocoa -framework QuartzCore
|
2020-01-17 20:05:45 +01:00
|
|
|
|
2020-07-08 21:43:27 +02:00
|
|
|
// D3D
|
2020-08-17 23:34:51 +02:00
|
|
|
#flag windows -DSOKOL_GLCORE33
|
|
|
|
//#flag windows -DSOKOL_D3D11
|
2020-01-17 20:05:45 +01:00
|
|
|
|
|
|
|
// for simplicity, all header includes are here because import order matters and we dont have any way
|
|
|
|
// to ensure import order with V yet
|
|
|
|
#define SOKOL_IMPL
|
2020-08-19 11:00:15 +02:00
|
|
|
|
|
|
|
// TODO should not be defined for android graphic (apk/aab using sokol) builds, but we have no ways to undefine
|
|
|
|
//#define SOKOL_NO_ENTRY
|
|
|
|
#flag linux -DSOKOL_NO_ENTRY
|
|
|
|
#flag darwin -DSOKOL_NO_ENTRY
|
|
|
|
#flag windows -DSOKOL_NO_ENTRY
|
|
|
|
#flag freebsd -DSOKOL_NO_ENTRY
|
|
|
|
#flag solaris -DSOKOL_NO_ENTRY
|
|
|
|
// TODO end
|
|
|
|
|
2020-01-17 20:05:45 +01:00
|
|
|
#include "sokol_app.h"
|
|
|
|
|
|
|
|
#define SOKOL_IMPL
|
|
|
|
#define SOKOL_NO_DEPRECATED
|
|
|
|
#include "sokol_gfx.h"
|
|
|
|
|
|
|
|
#define SOKOL_GL_IMPL
|
|
|
|
#include "util/sokol_gl.h"
|