@easywasm/gl 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -2
- package/web/gl.js +1068 -0
- package/web/glfw.js +931 -0
- package/src/example.c +0 -41
- package/src/gl.h +0 -569
- package/src/glfw3.h +0 -6577
- package/src/platform.h +0 -28
package/src/platform.h
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// this sets up GLFW/GL for native or wasm
|
|
2
|
-
|
|
3
|
-
#include "glfw3.h"
|
|
4
|
-
|
|
5
|
-
#ifdef __wasm__
|
|
6
|
-
#include "gl.h"
|
|
7
|
-
#elif defined(__APPLE__)
|
|
8
|
-
#include <OpenGL/gl.h>
|
|
9
|
-
#else
|
|
10
|
-
#include <GL/gl.h>
|
|
11
|
-
#endif
|
|
12
|
-
|
|
13
|
-
int update(void);
|
|
14
|
-
int setup();
|
|
15
|
-
|
|
16
|
-
int main(void) {
|
|
17
|
-
int ok = setup();
|
|
18
|
-
if (ok != 0) {
|
|
19
|
-
return ok;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
#ifndef __wasm__
|
|
23
|
-
while (update()) {}
|
|
24
|
-
glfwTerminate();
|
|
25
|
-
#endif
|
|
26
|
-
|
|
27
|
-
return 0;
|
|
28
|
-
}
|