-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzglTexture.cpp
executable file
·58 lines (50 loc) · 1.3 KB
/
zglTexture.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
* Copyright (C) 2010 ZiiLABS Pte Ltd
* All Rights Reserved.
*
* This software and its associated documentation may contain some
* proprietary, confidential and trade secret information of
* ZiiLABS Pte Ltd and except as provided by written agreement with
* ZiiLABS Pte Ltd
*
* a) no part may be disclosed, distributed, reproduced, transmitted,
* transcribed, stored in a retrieval system, adapted or translated
* in any form or by any means electronic, mechanical, magnetic,
* optical, chemical, manual or otherwise,
*
* and
*
* b) the recipient is not entitled to discover through reverse
* engineering or reverse compiling or other such techniques or
* processes the trade secrets contained therein or in the
* documentation.
*/
#include "zglCore.h"
#include "zglTexture.h"
zglTexture::~zglTexture()
{
#if !defined (ANDROID)
//!< On Android, The GLThread will free the GL resource automatically.
if (m_tex_id != 0)
{
zglCore::deleteTexture( m_tex_id);
}
#endif
}
void zglTexture::clearTexture()
{
if (m_tex_id != 0)
{
zglCore::deleteTexture( m_tex_id);
m_tex_id = 0;
}
}
#if 0
zglTexture& zglTexture::operator=(zglTexture& tex)
{
this->m_height = tex.m_height;
this->m_width = tex.m_width;
this->m_tex_id = tex.m_tex_id;
return *this;
}
#endif