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