blob: 7b856958d37c737f6e811db3f7cec5aba678fae5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#include "../../shared_cpp/OrthographicRenderer.h"
#include "../../shared_cpp/types.h"
#include "../../WebglContext.h"
#include <emscripten/html5.h>
type TriangleShape = OrthographicShape<3>;
EM_BOOL run(int eventType, const EmscriptenMouseEvent* mouseEvent, void* userData);
int main() {
WebglContext context;
context.init("#gl_canvas");
OrthographicRenderer renderer;
renderer.load();
TriangleShape shape;
shape.vertices = { { -1, -1, 0 },
{ 0, 1, 0 },
{ 1, -1, 0 } };
shape.load(&renderer);
return 0;
}
|