Add 'dotscape/' from commit 'f306501a68a51b634e895c5fdac70788ae899d75'
git-subtree-dir: dotscape git-subtree-mainline:6b91d64fc3git-subtree-split:f306501a68
This commit is contained in:
43
dotscape/ffi/glfw-export.c
Normal file
43
dotscape/ffi/glfw-export.c
Normal file
@@ -0,0 +1,43 @@
|
||||
#include <stdbool.h>
|
||||
#define GLFW_INCLUDE_NONE
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
// GLFW constants used below
|
||||
int CONTEXT_VERSION_MAJOR = GLFW_CONTEXT_VERSION_MAJOR;
|
||||
int DEPRECATED = GLFW_DECORATED;
|
||||
int GLFW_FFI_FALSE = GLFW_FALSE;
|
||||
int SAMPLES = GLFW_SAMPLES;
|
||||
|
||||
// GLFW functions used below
|
||||
void init() {
|
||||
glfwInit();
|
||||
}
|
||||
|
||||
void windowHint(int hint, int value) {
|
||||
glfwWindowHint(hint, value);
|
||||
}
|
||||
|
||||
GLFWwindow* createWindow(int width, int height, const char *title) {
|
||||
return glfwCreateWindow(width, height, title, NULL, NULL);
|
||||
}
|
||||
|
||||
void terminate() {
|
||||
glfwTerminate();
|
||||
}
|
||||
|
||||
void makeContextCurrent(GLFWwindow* window) {
|
||||
glfwMakeContextCurrent(window);
|
||||
}
|
||||
|
||||
bool windowShouldClose(GLFWwindow *window) {
|
||||
glfwWindowShouldClose(window);
|
||||
}
|
||||
|
||||
void pollEvents() {
|
||||
glfwPollEvents();
|
||||
}
|
||||
|
||||
void swapBuffers(GLFWwindow *window) {
|
||||
glfwSwapBuffers(window);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user