begin adding bindings to rgfw window library
This commit is contained in:
5
build-unix-rgfw-debug-.sh
Executable file
5
build-unix-rgfw-debug-.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
mlton -const 'Exn.keepHistory true' -link-opt "-lX11 -lXrandr -lGL -lm" \
|
||||
-export-header ffi/export.h \
|
||||
shf-tests.mlb \
|
||||
ffi/rgfw-export.c
|
||||
15217
ffi/RGFW.h
Normal file
15217
ffi/RGFW.h
Normal file
File diff suppressed because it is too large
Load Diff
16
ffi/rgfw-export.c
Normal file
16
ffi/rgfw-export.c
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <math.h>
|
||||
#define RGFW_IMPLEMENTATION
|
||||
#define RGFW_OPENGL /* if this line is not added, OpenGL functions will not be included */
|
||||
#include "RGFW.h"
|
||||
|
||||
#ifdef RGFW_MACOS
|
||||
#include <OpenGL/gl.h> /* why does macOS do this */
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#endif
|
||||
|
||||
RGFW_windowFlags OPENGL_WINDOW = RGFW_windowOpenGL;
|
||||
|
||||
RGFW_window* createWindow(char* title, int x, int y, int width, int height, RGFW_windowFlags options) {
|
||||
return RGFW_createWindow(title, x, y, width, height, options);
|
||||
}
|
||||
Reference in New Issue
Block a user