project_files/hwc/rtl/GL.h
author Wuzzy <Wuzzy2@mail.ru>
Sun, 15 Sep 2019 14:46:19 +0200
changeset 15397 b186e1f4c5ed
parent 15295 f382ec6dba11
permissions -rw-r--r--
Racer: Make sure the waypoint placer always has 0 delay
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7991
1e5da73a3149 better GL.h (which was needed after all)
koda
parents:
diff changeset
     1
#pragma once
1e5da73a3149 better GL.h (which was needed after all)
koda
parents:
diff changeset
     2
11793
80fe306460b2 Work around missing gl functions from emscripten headers
koda
parents: 7991
diff changeset
     3
#if defined(__APPLE__) && !defined(EMSCRIPTEN)
7991
1e5da73a3149 better GL.h (which was needed after all)
koda
parents:
diff changeset
     4
#include <OpenGL/gl.h>
1e5da73a3149 better GL.h (which was needed after all)
koda
parents:
diff changeset
     5
#else
1e5da73a3149 better GL.h (which was needed after all)
koda
parents:
diff changeset
     6
#include "GL/gl.h"
1e5da73a3149 better GL.h (which was needed after all)
koda
parents:
diff changeset
     7
#endif
1e5da73a3149 better GL.h (which was needed after all)
koda
parents:
diff changeset
     8
11793
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);
15295
f382ec6dba11 In hindsight my emscripten-ifdef (70d416a8f63f) is nonsense.
sheepluva
parents: 11793
diff changeset
    36
//void glShaderSource(GLuint shader, GLsizei count,/* const dropped for pas2c compat */ GLchar **string, const GLint *length);
f382ec6dba11 In hindsight my emscripten-ifdef (70d416a8f63f) is nonsense.
sheepluva
parents: 11793
diff changeset
    37
void glShaderSource(GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
11793
80fe306460b2 Work around missing gl functions from emscripten headers
koda
parents: 7991
diff changeset
    38
#endif