summaryrefslogtreecommitdiffstats
path: root/src/datavisualization/data/customrenderitem_p.h
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2014-05-21 13:37:11 +0300
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2014-05-22 08:03:06 +0300
commitcb79f11be1c0c379a1eccea62606a58b73442f2f (patch)
tree0e8409d491897b4fc9d1929ea1e13e575c6b7198 /src/datavisualization/data/customrenderitem_p.h
parent37a82fbeb7aa59260fe5f31b62228914ee4a44a3 (diff)
Cache ObjectHelper instances
Task-number: QTRD-2792 Change-Id: I90d83bd9b73a0f337fd26f1b92000e72b3ec0607 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'src/datavisualization/data/customrenderitem_p.h')
-rw-r--r--src/datavisualization/data/customrenderitem_p.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/datavisualization/data/customrenderitem_p.h b/src/datavisualization/data/customrenderitem_p.h
index f05540d0..17195f7b 100644
--- a/src/datavisualization/data/customrenderitem_p.h
+++ b/src/datavisualization/data/customrenderitem_p.h
@@ -35,12 +35,12 @@
QT_BEGIN_NAMESPACE_DATAVISUALIZATION
class QCustom3DItem;
+class Abstract3DRenderer;
class CustomRenderItem : public AbstractRenderItem
{
public:
CustomRenderItem();
- CustomRenderItem(const CustomRenderItem &other);
virtual ~CustomRenderItem();
inline void setTexture(GLuint texture) { m_texture = texture; }
@@ -65,19 +65,24 @@ public:
inline int index() const { return m_index; }
inline void setShadowCasting(bool shadowCasting) { m_shadowCasting = shadowCasting; }
inline bool isShadowCasting() const { return m_shadowCasting; }
+ inline void setRenderer(Abstract3DRenderer *renderer) { m_renderer = renderer; }
private:
+ Q_DISABLE_COPY(CustomRenderItem)
+
GLuint m_texture;
QVector3D m_scaling;
QVector3D m_position;
bool m_absolute;
- ObjectHelper *m_object;
+ ObjectHelper *m_object; // shared reference
bool m_needBlend;
bool m_visible;
bool m_valid;
int m_index;
bool m_shadowCasting;
QCustom3DItem *m_item;
+ Abstract3DRenderer *m_renderer;
+
};
typedef QHash<QCustom3DItem *, CustomRenderItem *> CustomRenderItemArray;