0022796: Possibility to display multi-line text in 3D
[occt.git] / src / OpenGl / OpenGl_Memory.hxx
1 #ifndef OPENGL_MEMORY_H
2 #define OPENGL_MEMORY_H
3
4 #include <Standard.hxx>
5
6 template <class XType> XType *cmn_resizemem( XType *ptr, Tint size )
7 {
8   size *= sizeof(XType);
9
10   ptr = (XType*)realloc( ptr, size );
11
12   if ( !ptr ) {
13     fprintf(stderr, "Could not reallocate '%d'\
14                     bytes of memory.\n", size);
15   }
16
17   return ptr;
18 }
19
20 #endif //OPENGL_MEMORY_H