0012121: Optimization of existing selection classes
[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>
5#include <Standard_TypeDef.hxx>
6#include <NCollection_DataMap.hxx>
7#include <NCollection_Stack.hxx>
8#include <NCollection_List.hxx>
9#include <NCollection_Array1.hxx>
10#include <NCollection_Vector.hxx>
11
12
13template <class XType> XType *cmn_resizemem( XType *ptr, Tint size )
14{
15 size *= sizeof(XType);
16
17 ptr = (XType*)realloc( ptr, size );
18
19 if ( !ptr ) {
20 fprintf(stderr, "Could not reallocate '%d'\
21 bytes of memory.\n", size);
22 }
23
24 return ptr;
25}
26
27class OpenGl_MemoryMgr {
28private:
29 OpenGl_MemoryMgr();
30 OpenGl_MemoryMgr(const OpenGl_MemoryMgr&);
31 ~OpenGl_MemoryMgr();
32};
33
34#endif //OPENGL_MEMORY_H