0022819: Redesign of OpenGl driver Additional integration
[occt.git] / src / OpenGl / OpenGl_Memory.hxx
CommitLineData
7fd59977 1#ifndef OPENGL_MEMORY_H
2#define OPENGL_MEMORY_H
3
4#include <OpenGl_tgl_all.hxx>
7fd59977 5
6template <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
7fd59977 20#endif //OPENGL_MEMORY_H