polyadvent

A game engine from scratch in C
git clone git://jb55.com/polyadvent
Log | Files | Refs | README

gl.h (3905B)


      1 #ifndef POLYADVENT_GL_H
      2 #define POLYADVENT_GL_H
      3 
      4 /* #include <epoxy/gl.h> */
      5 #include <SDL2/SDL.h>
      6 #include <GL/gl.h>
      7 #include <GL/glx.h>
      8 #include <GL/glext.h>
      9 
     10 void glGenBuffers(GLsizei n, GLuint * buffers);
     11 void glGetShaderiv(GLuint shader, GLenum pname, GLint *params);
     12 void glGetShaderInfoLog(GLuint shader, GLsizei maxLength, GLsizei *length, GLchar *infoLog);
     13 void glBindBuffer(GLenum target, GLuint buffer);
     14 GLuint glCreateShader(GLenum shaderType);
     15 void glCompileShader(GLuint shader);
     16 
     17 void glShaderSource(GLuint shader, GLsizei count, const GLchar **string,
     18                     const GLint *length);
     19 
     20 void glBufferData(GLenum target, GLsizeiptr size, const GLvoid * data, GLenum usage);
     21 GLint glGetUniformLocation(GLuint program, const GLchar *name);
     22 GLint glGetAttribLocation(GLuint program, const GLchar *name);
     23 void glEnableVertexAttribArray(GLuint index);
     24 void glDeleteShader(GLuint shader);
     25 
     26 void glDeleteBuffers(GLsizei n, const GLuint * buffers);
     27 
     28 void glVertexAttribPointer(GLuint index, GLint size, GLenum type,
     29                            GLboolean normalized, GLsizei stride,
     30                            const GLvoid * pointer);
     31 
     32 void glVertexAttribIPointer(GLuint index,
     33                             GLint size,
     34                             GLenum type,
     35                             GLsizei stride,
     36                             const GLvoid * pointer);
     37 
     38 void glUniform1i(GLint location, GLint i);
     39 void glUniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
     40 GLuint glCreateProgram(void);
     41 void glAttachShader(GLuint program, GLuint shader);
     42 void glLinkProgram(GLuint program);
     43 
     44 void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose,
     45                         const GLfloat *value);
     46 
     47 void glUseProgram(GLuint program);
     48 void glUniform1f(GLint location, GLfloat v0);
     49 void glUniform2f(GLint location, GLfloat v0, GLfloat v1);
     50 void glGetProgramiv(GLuint program, GLenum pname, GLint *params);
     51 void glDeleteProgram(	GLuint program);
     52 
     53 void glGenFramebuffers(GLsizei handle, GLuint *ids);
     54 void glBindFramebuffer(	GLenum target, GLuint framebuffer);
     55 GLenum glCheckFramebufferStatus(GLenum target);
     56 void glDeleteFramebuffers(GLsizei n, const GLuint * framebuffers);
     57 
     58 void glDisableVertexAttribArray(GLuint index);
     59 void glDeleteVertexArrays(GLsizei n, const GLuint *arrays);
     60 
     61 GLboolean glIsBuffer(	GLuint buffer);
     62 
     63 
     64 void glTexImage2D(	GLenum target,
     65                     GLint level,
     66                     GLint internalformat,
     67                     GLsizei width,
     68                     GLsizei height,
     69                     GLint border,
     70                     GLenum format,
     71                     GLenum type,
     72                     const GLvoid * data);
     73 
     74 void glFramebufferTexture2D(	GLenum target,
     75                                 GLenum attachment,
     76                                 GLenum textarget,
     77                                 GLuint texture,
     78                                 GLint level);
     79 
     80 void glGenRenderbuffers(	GLsizei n,
     81                             GLuint * renderbuffers);
     82 
     83 void glBindRenderbuffer(	GLenum target,
     84                             GLuint renderbuffer);
     85 
     86 void glRenderbufferStorage(	GLenum target,
     87                             GLenum internalformat,
     88                             GLsizei width,
     89                             GLsizei height);
     90 
     91 void glFramebufferRenderbuffer(	GLenum target,
     92                                 GLenum attachment,
     93                                 GLenum renderbuffertarget,
     94                                 GLuint renderbuffer);
     95 
     96 
     97 void glDeleteRenderbuffers(	GLsizei n,
     98                             GLuint *renderbuffers);
     99 
    100 
    101 void glFramebufferTexture(	GLenum target,
    102                             GLenum attachment,
    103                             GLuint texture,
    104                             GLint level);
    105 
    106 void glPatchParameteri(	GLenum pname,
    107                         GLint value);
    108 
    109 void glBindVertexArray(	GLuint array);
    110 
    111 #endif /* POLYADVENT_GL_H */