| 53 | } |
| 54 | |
| 55 | GLuint create_program(GLuint vert, GLuint frag) { |
| 56 | GLuint program = glCreateProgram(); |
| 57 | GL_CALL(glAttachShader(program, vert)); |
| 58 | GL_CALL(glAttachShader(program, frag)); |
| 59 | GL_CALL(glBindAttribLocation(program, 0, "position")); |
| 60 | GL_CALL(glLinkProgram(program)); |
| 61 | return program; |
| 62 | } |
| 63 | |
| 64 | int main() { |
| 65 | EmscriptenWebGLContextAttributes attrs; |