author | alfadur |
Sat, 06 Oct 2018 01:24:27 +0300 | |
changeset 13875 | a966b1914792 |
parent 11798 | 80fe306460b2 |
child 15300 | f382ec6dba11 |
permissions | -rw-r--r-- |
7991 | 1 |
#pragma once |
2 |
||
11798
80fe306460b2
Work around missing gl functions from emscripten headers
koda
parents:
7991
diff
changeset
|
3 |
#if defined(__APPLE__) && !defined(EMSCRIPTEN) |
7991 | 4 |
#include <OpenGL/gl.h> |
5 |
#else |
|
6 |
#include "GL/gl.h" |
|
7 |
#endif |
|
8 |
||
11798
80fe306460b2
Work around missing gl functions from emscripten headers
koda
parents:
7991
diff
changeset
|
9 |
/* emscripten cannot find these functions */ |
80fe306460b2
Work around missing gl functions from emscripten headers
koda
parents:
7991
diff
changeset
|
10 |
#ifdef EMSCRIPTEN |
80fe306460b2
Work around missing gl functions from emscripten headers
koda
parents:
7991
diff
changeset
|
11 |
void glGetProgramInfoLog(GLuint program, GLsizei maxLength, GLsizei *length, GLchar *infoLog); |
80fe306460b2
Work around missing gl functions from emscripten headers
koda
parents:
7991
diff
changeset
|
12 |
void glLinkProgram(GLuint program); |
80fe306460b2
Work around missing gl functions from emscripten headers
koda
parents:
7991
diff
changeset
|
13 |
void glUniform1i(GLint location, GLint v0); |
80fe306460b2
Work around missing gl functions from emscripten headers
koda
parents:
7991
diff
changeset
|
14 |
GLuint glCreateProgram(void); |
80fe306460b2
Work around missing gl functions from emscripten headers
koda
parents:
7991
diff
changeset
|
15 |
void glUseProgram(GLuint program); |
80fe306460b2
Work around missing gl functions from emscripten headers
koda
parents:
7991
diff
changeset
|
16 |
void glDeleteProgram(GLuint program); |
80fe306460b2
Work around missing gl functions from emscripten headers
koda
parents:
7991
diff
changeset
|
17 |
void glGetProgramiv(GLuint program, GLenum pname, GLint *params); |
80fe306460b2
Work around missing gl functions from emscripten headers
koda
parents:
7991
diff
changeset
|
18 |
void glDeleteShader(GLuint shader); |
80fe306460b2
Work around missing gl functions from emscripten headers
koda
parents:
7991
diff
changeset
|
19 |
void glBindAttribLocation(GLuint program, GLuint index, const GLchar *name); |
80fe306460b2
Work around missing gl functions from emscripten headers
koda
parents:
7991
diff
changeset
|
20 |
void glAttachShader(GLuint program, GLuint shader); |
80fe306460b2
Work around missing gl functions from emscripten headers
koda
parents:
7991
diff
changeset
|
21 |
void glBindBuffer(GLenum target, GLuint buffer); |
80fe306460b2
Work around missing gl functions from emscripten headers
koda
parents:
7991
diff
changeset
|
22 |
void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); |
80fe306460b2
Work around missing gl functions from emscripten headers
koda
parents:
7991
diff
changeset
|
23 |
void glEnableVertexAttribArray(GLuint index); |
80fe306460b2
Work around missing gl functions from emscripten headers
koda
parents:
7991
diff
changeset
|
24 |
void glDisableVertexAttribArray(GLuint index); |
80fe306460b2
Work around missing gl functions from emscripten headers
koda
parents:
7991
diff
changeset
|
25 |
void glGenBuffers(GLsizei n, GLuint * buffers); |
80fe306460b2
Work around missing gl functions from emscripten headers
koda
parents:
7991
diff
changeset
|
26 |
void glDeleteBuffers(GLsizei n, const GLuint * buffers); |
80fe306460b2
Work around missing gl functions from emscripten headers
koda
parents:
7991
diff
changeset
|
27 |
void glUniform4fv(GLint location, GLsizei count, const GLfloat *value); |
80fe306460b2
Work around missing gl functions from emscripten headers
koda
parents:
7991
diff
changeset
|
28 |
void glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * pointer); |
80fe306460b2
Work around missing gl functions from emscripten headers
koda
parents:
7991
diff
changeset
|
29 |
void glBufferData(GLenum target, GLsizeiptr size, const GLvoid * data, GLenum usage); |
80fe306460b2
Work around missing gl functions from emscripten headers
koda
parents:
7991
diff
changeset
|
30 |
void glUniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); |
80fe306460b2
Work around missing gl functions from emscripten headers
koda
parents:
7991
diff
changeset
|
31 |
GLint glGetUniformLocation(GLuint program, const GLchar *name); |
80fe306460b2
Work around missing gl functions from emscripten headers
koda
parents:
7991
diff
changeset
|
32 |
void glGetShaderInfoLog(GLuint shader, GLsizei maxLength, GLsizei *length, GLchar *infoLog); |
80fe306460b2
Work around missing gl functions from emscripten headers
koda
parents:
7991
diff
changeset
|
33 |
void glGetShaderiv(GLuint shader, GLenum pname, GLint *params); |
80fe306460b2
Work around missing gl functions from emscripten headers
koda
parents:
7991
diff
changeset
|
34 |
GLuint glCreateShader(GLenum shaderType); |
80fe306460b2
Work around missing gl functions from emscripten headers
koda
parents:
7991
diff
changeset
|
35 |
void glCompileShader(GLuint shader); |
80fe306460b2
Work around missing gl functions from emscripten headers
koda
parents:
7991
diff
changeset
|
36 |
void glShaderSource(GLuint shader, GLsizei count,/* const dropped for pas2c compat */ GLchar **string, const GLint *length); |
80fe306460b2
Work around missing gl functions from emscripten headers
koda
parents:
7991
diff
changeset
|
37 |
#endif |