github.com/gotranspile/cxgo@v0.3.8-0.20240118201721-29871598a6a2/libs/includes/GL/gl.h (about) 1 2 typedef int GLint; 3 typedef float GLfloat; 4 typedef unsigned int GLuint; 5 typedef unsigned int GLsizei; 6 typedef unsigned int GLbitfield; 7 typedef unsigned int GLsizeiptr; 8 typedef int GLenum; 9 typedef char GLchar; 10 #define GLvoid void 11 typedef int GLboolean; 12 13 // fake enum values 14 const int GL_FALSE = 0; 15 const int GL_TEXTURE_2D = 0; 16 const int GL_UNPACK_ROW_LENGTH = 0; 17 const int GL_BGRA = 0; 18 const int GL_RGBA = 0; 19 const int GL_TEXTURE_WRAP_S = 0; 20 const int GL_TEXTURE_WRAP_T = 0; 21 const int GL_TEXTURE_MIN_FILTER = 0; 22 const int GL_FRAMEBUFFER = 0; 23 const int GL_COLOR_BUFFER_BIT = 0; 24 const int GL_UNSIGNED_SHORT_1_5_5_5_REV = 0; 25 const int GL_UNSIGNED_SHORT_5_5_5_1 = 0; 26 const int GL_LINEAR = 0; 27 const int GL_ARRAY_BUFFER = 0; 28 const int GL_FLOAT = 0; 29 const int GL_TRIANGLE_STRIP = 0; 30 const int GL_TRIANGLES = 0; 31 const int GL_CLAMP_TO_EDGE = 0; 32 const int GL_TEXTURE0 = 0; 33 const int GL_VERTEX_SHADER = 0; 34 const int GL_COMPILE_STATUS = 0; 35 const int GL_FRAGMENT_SHADER = 0; 36 const int GL_LINK_STATUS = 0; 37 const int GL_STATIC_DRAW = 0; 38 39 void glViewport(GLint x, GLint y, GLsizei width, GLsizei height); 40 void glBindTexture(GLenum target, GLuint texture); 41 GLenum glGetError( void); 42 void glPixelStorei(GLenum pname, GLint param); 43 void glTexSubImage2D( GLenum target, 44 GLint level, 45 GLint xoffset, 46 GLint yoffset, 47 GLsizei width, 48 GLsizei height, 49 GLenum format, 50 GLenum type, 51 const GLvoid * pixels); 52 void glTexParameteri( GLenum target, 53 GLenum pname, 54 GLint param); 55 void glBindFramebuffer( GLenum target, 56 GLuint framebuffer); 57 void glClear(GLbitfield mask); 58 void glUseProgram( GLuint program); 59 void glUniform1i( GLint location, GLint v0); 60 void glUniform1f(GLint location, GLfloat v0); 61 void glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); 62 void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); 63 void glBindBuffer( GLenum target, 64 GLuint buffer); 65 66 void glVertexAttribPointer( GLuint index, 67 GLint size, 68 GLenum type, 69 GLboolean normalized, 70 GLsizei stride, 71 const GLvoid * pointer); 72 73 void glDrawArrays( GLenum mode, 74 GLint first, 75 GLsizei count); 76 77 void glGenTextures( GLsizei n, 78 GLuint * textures); 79 void glActiveTexture( GLenum texture); 80 void glTexImage2D( GLenum target, 81 GLint level, 82 GLint internalformat, 83 GLsizei width, 84 GLsizei height, 85 GLint border, 86 GLenum format, 87 GLenum type, 88 const GLvoid * data); 89 GLuint glCreateShader( GLenum shaderType); 90 void glShaderSource( GLuint shader, 91 GLsizei count, 92 const GLchar **string, 93 const GLint *length); 94 void glCompileShader( GLuint shader); 95 void glGetShaderiv(GLuint shader, GLenum pname, GLint *params); 96 void glGetShaderInfoLog( GLuint shader, 97 GLsizei maxLength, 98 GLsizei *length, 99 GLchar *infoLog); 100 GLuint glCreateProgram( void); 101 void glAttachShader( GLuint program, 102 GLuint shader); 103 void glLinkProgram( GLuint program); 104 void glGetProgramiv(GLuint program, GLenum pname, GLint *params); 105 GLint glGetAttribLocation( GLuint program, 106 const GLchar *name); 107 void glEnableVertexAttribArray( GLuint index); 108 GLint glGetUniformLocation( GLuint program, 109 const GLchar *name); 110 void glGenBuffers( GLsizei n, 111 GLuint * buffers); 112 void glBufferData( GLenum target, 113 GLsizeiptr size, 114 const GLvoid * data, 115 GLenum usage);