0022792: Globally defined symbol PI conflicts with VTK definition (Intel compiler)
[occt.git] / src / OpenGl / OpenGl_ResourceVBO.cxx
1 // File:      OpenGl_ResourceVBO.cxx
2 // Created:   18.03.11 9:50:00
3 // Author:    Anton POLETAEV
4
5 #include <OpenGl_ResourceVBO.hxx>
6 #include <OpenGl_tgl_all.hxx>
7 #include <OpenGl_Extension.hxx>
8
9 typedef void (APIENTRY* PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers);
10
11 extern PFNGLDELETEBUFFERSARBPROC glVBODeleteBuffersARB;  
12 extern int VBOExtension;
13
14 //=======================================================================
15 //function : OpenGl_ResourceVBO
16 //purpose  : Constructor
17 //=======================================================================
18
19 OpenGl_ResourceVBO::OpenGl_ResourceVBO(GLuint theId) 
20 : OpenGl_Resource(theId) 
21 {
22
23 }
24
25 //=======================================================================
26 //function : OpenGl_ResourceVBO
27 //purpose  : Copy constructor
28 //=======================================================================
29
30 OpenGl_ResourceVBO::OpenGl_ResourceVBO( const OpenGl_ResourceVBO& theResource) 
31 : OpenGl_Resource(theResource) 
32 {
33
34 }
35
36 //=======================================================================
37 //function : Clean
38 //purpose  : free OpenGl memory allocated for vbo resource
39 //=======================================================================
40
41 void OpenGl_ResourceVBO::Clean()
42 {
43   if (VBOExtension)
44     glVBODeleteBuffersARB( 1 , &myId );
45 }