1 #define GL_GLEXT_PROTOTYPES
3 #define WIN32_LEAN_AND_MEAN
12 #ifndef GL_VERSION_1_5
13 #define GL_ARRAY_BUFFER 0x8892
14 #define GL_DYNAMIC_DRAW 0x88E8
15 #define GL_STATIC_DRAW 0x88E4
16 #define GL_WRITE_ONLY 0x88B9
18 #define APIENTRYP APIENTRY *
20 typedef ptrdiff_t GLintptr
;
21 typedef ptrdiff_t GLsizeiptr
;
22 typedef void (APIENTRYP PFNGLBINDBUFFERPROC
) (GLenum target
, GLuint buffer
);
23 typedef void (APIENTRYP PFNGLGENBUFFERSPROC
) (GLsizei n
, GLuint
*buffers
);
24 typedef void (APIENTRYP PFNGLBUFFERDATAPROC
) (GLenum target
, GLsizeiptr size
, const GLvoid
*data
, GLenum usage
);
25 typedef GLvoid
* (APIENTRYP PFNGLMAPBUFFERPROC
) (GLenum target
, GLenum access
);
26 typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC
) (GLenum target
);
27 static PFNGLBINDBUFFERPROC glBindBuffer
;
28 static PFNGLGENBUFFERSPROC glGenBuffers
;
29 static PFNGLBUFFERDATAPROC glBufferData
;
30 static PFNGLMAPBUFFERPROC glMapBuffer
;
31 static PFNGLUNMAPBUFFERPROC glUnmapBuffer
;
32 #define GETPA(name) for (;;) { \
33 *(PROC *) &gl##name = wglGetProcAddress ("gl" # name); \
35 fprintf (stderr, "could not get address of gl"#name"\n"); \
36 exit (EXIT_FAILURE); \