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
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.
18 #ifndef GEOOPENGLRENDERER_H
19 #define GEOOPENGLRENDERER_H
21 #include "common/HereMaps_global.h"
25 #ifdef TIZEN_MIGRATION
26 #include "graphic/FloatRectangle.h"
27 #include "graphic/Color.h"
28 #include "internal/DoublePoint3.h"
30 #include <FGraphics.h>
33 HERE_MAPS_BEGIN_NAMESPACE
37 class GeoMapObjectMarker;
38 class GeoProjectionNode;
42 * This class encapsulates an Open GL renderer used to render map tiles.
46 class GeoOpenGlRenderer
50 * This method is the default constructor.
55 * This method is the default destructor.
60 * This method creates an EGL texture from the image associated with the
61 * caller-supplied bitmap drawable.
63 * @param rDrawableBitmap A reference to a bitmap object that contains the
66 * @return <code>true</code> if the image has been made drawable,
67 * <code>false</code> if a texture could not be associated with the supplied
70 bool MakeDrawable(DrawableBitmap& rDrawableBitmap);
73 * This method renders the image(s) provided by the caller. The caller can
74 * specify the size of the area to render (the visible map area).
76 * @param nodes A list of objects containing images to render.
78 * @param width A value indicating the width of the area to render.
80 * @param height A value indicating the height of the area to render.
82 bool Render(const std::vector<GeoProjectionNode*>& nodes,
86 #ifdef TIZEN_MIGRATION
88 * This method renders a square, using the rectangle and texture specified
91 * @param aRect A constant reference to the double points to render.
93 * @param uTexture A value of the id of the texture object to apply.
95 * @param sx0 A value providing the x coordinate of the top left corner of
96 * the rectangle in the tile grid.
98 * @param sy0 A value providing the y coordinate of the top left corner of
99 * the rectangle in the tile grid.
101 * @param sx1 A value providing the x coordinate of the bottom right corner of
102 * the rectangle in the tile grid.
104 * @param sy1 A value providing the y coordinate of the bottom right corner of
105 * the rectangle in the tile grid.
107 bool RenderQuad(const std::vector<DoublePoint3>& aRect, unsigned int uTextureId, float sx0=0.f, float sy0=1.f, float sx1=1.f, float sy1=0.f);
111 * This method renders a square, using the rectangle and texture specified
114 * @param aRect A constant reference to the rectangle to render.
116 * @param rTexture A constant reference to the texture object to apply.
118 * @param sx0 A value providing the x coordinate of the top left corner of
119 * the rectangle in the tile grid.
121 * @param sy0 A value providing the y coordinate of the top left corner of
122 * the rectangle in the tile grid.
124 * @param sx1 A value providing the x coordinate of the bottom right corner of
125 * the rectangle in the tile grid.
127 * @param sy1 A value providing the y coordinate of the bottom right corner of
128 * the rectangle in the tile grid.
130 bool RenderQuad(const Tizen::Maps::FloatRectangle& aRect, const GlTexture& rTexture, float sx0=0.f, float sy0=1.f, float sx1=1.f, float sy1=0.f);
133 * This method renders a square, using the rectangle and texture specified
136 * @param aRect A constant reference to the rectangle to render.
138 * @param uTexture A value of the id of the texture object to apply.
140 * @param sx0 A value providing the x coordinate of the top left corner of
141 * the rectangle in the tile grid.
143 * @param sy0 A value providing the y coordinate of the top left corner of
144 * the rectangle in the tile grid.
146 * @param sx1 A value providing the x coordinate of the bottom right corner of
147 * the rectangle in the tile grid.
149 * @param sy1 A value providing the y coordinate of the bottom right corner of
150 * the rectangle in the tile grid.
152 bool RenderQuad(const Tizen::Maps::FloatRectangle& aRect, unsigned int uTextureId, float sx0=0.f, float sy0=1.f, float sx1=1.f, float sy1=0.f);
155 * This method changes the color that will be used by the gl clear method.
157 void SetClearColor(const Tizen::Maps::Color& color);
160 * This method clears the screen.
168 HERE_MAPS_NO_COPY_NO_ASSIGN(GeoOpenGlRenderer);
169 class GeoOpenGlRendererImpl;
170 GeoOpenGlRendererImpl* m_pImpl;
173 HERE_MAPS_END_NAMESPACE
175 #endif // GEOOPENGLRENDERER_P_H