From f02a283c06c51cb29f79e89754b31ffd6952d2e6 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 21 Oct 2021 07:14:46 +0200 Subject: Add vertex buffer --- include/mgl/gl.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'include/mgl/gl.h') 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 +#include 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); -- cgit v1.2.3