0012121: Optimization of existing selection classes
[occt.git] / src / OpenGl / OpenGl_ResourceTexture.cxx
CommitLineData
161c4476
K
1// File: OpenGl_ResourceTexture.cxx
2// Created: 18.03.11 9:40:00
3// Author: Anton POLETAEV
4
5#include <OpenGl_ResourceTexture.hxx>
6#include <OpenGl_tgl_all.hxx>
7#include <OpenGl_Extension.hxx>
8
9#ifdef __sgi
10#define glGenTextures glGenTexturesEXT
11#define glDeleteTextures glDeleteTexturesEXT
12#define glBindTexture glBindTextureEXT
13#endif /* IRIX */
14
15//=======================================================================
16//function : OpenGl_ResourceTexture
17//purpose : Constructor
18//=======================================================================
19
20OpenGl_ResourceTexture::OpenGl_ResourceTexture(GLuint theId)
21: OpenGl_Resource(theId)
22{
23
24}
25
26//=======================================================================
27//function : OpenGl_ResourceTexture
28//purpose : Copy constructor
29//=======================================================================
30
31OpenGl_ResourceTexture::OpenGl_ResourceTexture(const OpenGl_ResourceTexture& theResource)
32: OpenGl_Resource(theResource)
33{
34
35}
36
37//=======================================================================
38//function : Clean
39//purpose : free OpenGl memory allocated for texture resource
40//=======================================================================
41
42void OpenGl_ResourceTexture::Clean()
43{
44 glDeleteTextures(1, &myId);
45}