15521428cdd78c63cac5abe1d94331a25fa9f476
[platform/core/location/maps-plugin-here.git] / inc / engine / maps / GlTexture.h
1 /*
2  * Copyright (C) 2013 HERE Global B.V. All rights reserved.
3  * This software, including documentation, is protected by copyright controlled by
4  * HERE Global B.V. (“Software”). All rights are reserved. Copying, including reproducing,
5  * storing, adapting or translating, any or all of this material requires the prior
6  * written consent of HERE Global B.V. You may use this
7  * Software in accordance with the terms and conditions defined in the
8  * HERE Location Platform Services Terms and Conditions, available at
9  * http://developer.here.com/terms-conditions-base
10  *
11  * As an additional permission to the above, you may distribute Software,
12  * in object code format as part of an Application, according to, and subject to, terms and
13  * conditions defined in the Tizen Software Development kit (“SDK”) License Agreement.
14  * You may distribute such object code format Application under terms of your choice,
15  * provided that the header and source files of the Software have not been modified.
16  */
17
18 #ifndef GLTEXTURE_H
19 #define GLTEXTURE_H
20
21 #include "common/HereMaps_global.h"
22
23 #ifdef TIZEN_MIGRATION
24 #include "graphic/Bitmap.h"
25 #else
26 #include <FGraphics.h>
27 #endif
28
29 HERE_MAPS_BEGIN_NAMESPACE
30
31 /**
32  * This class encapsulates a GL texture that is a container for map tile bitmaps.
33  * 
34  * \ingroup maps
35  */
36 class GlTexture
37 {
38 public:
39     
40     /**
41      * This method is a constructor that initializes a new texture instance with
42      * the bitmap object provided by the caller.
43      * 
44      * @param rBitmap A constant reference to a bitmap object.
45      */
46     GlTexture(const Tizen::Maps::Bitmap& rBitmap);
47
48     /**
49      * This method is the destructor.
50      */
51     ~GlTexture();
52     
53     /**
54      * This method retrieves the texture id.
55      * 
56      * @return A value representing the texture id.
57      */
58     unsigned int GetTextureId() const;
59     
60     /**
61      * This method sets the texture id.
62      * 
63      * @param uId A value representing the texture id.
64      */
65     void SetTextureId(unsigned int uId);
66
67     /**
68      * This method checks if the called instance wraps a valid GL texture
69      *
70      */
71     bool IsValid() const;
72
73     /**
74      * This method checks if the passed texture handle is a valid GL texture
75      *
76      */
77     static bool IsValid(unsigned int uId);
78
79 private:
80     HERE_MAPS_NO_COPY_NO_ASSIGN(GlTexture);
81
82     class GlTextureImpl;
83     GlTextureImpl* m_pImpl;
84 };
85
86 HERE_MAPS_END_NAMESPACE
87
88 #endif