diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-10-21 07:14:46 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-10-21 07:14:46 +0200 |
commit | f02a283c06c51cb29f79e89754b31ffd6952d2e6 (patch) | |
tree | 2eb691e105b65d3ca0464ed00628dd0b0974955a /include/mgl/gl.h | |
parent | 2d4457a5ee926eca221102ee70f118b305ea2670 (diff) |
Add vertex buffer
Diffstat (limited to 'include/mgl/gl.h')
-rw-r--r-- | include/mgl/gl.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/mgl/gl.h b/include/mgl/gl.h index 6de98d9..8a09e3e 100644 --- a/include/mgl/gl.h +++ b/include/mgl/gl.h @@ -3,6 +3,7 @@ #include "gl_macro.h" #include <stdint.h> +#include <sys/types.h> typedef struct _XVisualInfo _XVisualInfo; typedef struct _XDisplay Display; @@ -37,7 +38,20 @@ typedef struct { void (*glTexCoord2f)(float s, float t); void (*glOrtho)(double left, double right, double bottom, double top, double near_val, double far_val); void (*glMatrixMode)(unsigned int mode); + void (*glPushMatrix)(void); + void (*glPopMatrix)(void); void (*glLoadIdentity)(void); + void (*glTranslatef)(float x, float y, float z); + void (*glGenBuffers)(int n, unsigned int *buffers); + void (*glBindBuffer)(unsigned int target, unsigned int buffer); + void (*glDeleteBuffers)(int n, const unsigned int *buffers); + void (*glBufferData)(unsigned int target, ssize_t size, const void *data, unsigned int usage); + void (*glBufferSubData)(unsigned int target, ssize_t offset, ssize_t size, const void *data); + void (*glDrawArrays)(unsigned int mode, int first, int count); + void (*glEnableClientState)(unsigned int cap); + void (*glVertexPointer)(int size, unsigned int type, int stride, const void *ptr); + void (*glColorPointer)(int size, unsigned int type, int stride, const void *ptr); + void (*glTexCoordPointer)(int size, unsigned int type, int stride, const void *ptr); /* Optional*/ void (*glXSwapIntervalEXT)(Display * dpy, GLXDrawable drawable, int interval); |