Commit | Line | Data |
---|---|---|
2166f0fa SK |
1 | // File: OpenGl_ArbVBO.hxx |
2 | // Created: 26 January 2012 | |
3 | // Author: Kirill GAVRILOV | |
4 | // Copyright: OPEN CASCADE 2012 | |
5 | ||
6 | #ifndef _OpenGl_ArbVBO_H__ | |
7 | #define _OpenGl_ArbVBO_H__ | |
8 | ||
9 | #if (defined(_WIN32) || defined(__WIN32__)) | |
10 | #include <windows.h> | |
11 | #endif | |
12 | #include <GL/gl.h> | |
13 | ||
14 | typedef ptrdiff_t GLsizeiptr; | |
15 | ||
16 | //! VBO is part of OpenGL since 1.5 | |
17 | struct OpenGl_ArbVBO | |
18 | { | |
19 | #ifndef GL_ARRAY_BUFFER_ARB | |
20 | #define GL_ARRAY_BUFFER_ARB 0x8892 | |
21 | #endif | |
22 | #ifndef GL_STATIC_DRAW_ARB | |
23 | #define GL_STATIC_DRAW_ARB 0x88E4 | |
24 | #endif | |
25 | #ifndef GL_ELEMENTS_ARRAY_BUFFER_ARB | |
26 | #define GL_ELEMENTS_ARRAY_BUFFER_ARB 0x8893 | |
27 | #endif | |
28 | ||
29 | public: | |
30 | ||
31 | typedef void (APIENTRY *glBindBuffer_t) (GLenum target, GLuint buffer); | |
32 | typedef void (APIENTRY *glDeleteBuffers_t) (GLsizei n, const GLuint* buffers); | |
33 | typedef void (APIENTRY *glGenBuffers_t) (GLsizei n, GLuint* buffers); | |
34 | typedef void (APIENTRY *glBufferData_t) (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage); | |
35 | ||
36 | public: | |
37 | ||
38 | glGenBuffers_t glGenBuffersARB; | |
39 | glBindBuffer_t glBindBufferARB; | |
40 | glBufferData_t glBufferDataARB; | |
41 | glDeleteBuffers_t glDeleteBuffersARB; | |
42 | ||
43 | }; | |
44 | ||
45 | #endif // _OpenGl_ArbVBO_H__ |