diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2017-08-24 16:07:56 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-08-25 12:41:59 +0000 |
commit | d14943f86e758974bcbdd1bcbc20bd2b085970bc (patch) | |
tree | 4ed4e064f6d0a8eed9b68ca6b6abb542a91b9850 /src | |
parent | 780e11cf38a98cd32b6a5aa44dbb4cbf0f5d5ff8 (diff) |
Fix symbol clash in static builds in etc texture provider
All symbols must be prefixed with Q to avoid clashes with user code when
linking statically.
Task-number: QTBUG-62772
Change-Id: Ib4d44ad2db3053fc8dba3235ee2774774a38bf6c
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/scenegraph/compressedtexture/qsgpkmhandler.cpp | 14 | ||||
-rw-r--r-- | src/quick/scenegraph/compressedtexture/qsgpkmhandler_p.h | 6 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/quick/scenegraph/compressedtexture/qsgpkmhandler.cpp b/src/quick/scenegraph/compressedtexture/qsgpkmhandler.cpp index 1b8882e9a5..bb8fce046d 100644 --- a/src/quick/scenegraph/compressedtexture/qsgpkmhandler.cpp +++ b/src/quick/scenegraph/compressedtexture/qsgpkmhandler.cpp @@ -75,35 +75,35 @@ static unsigned int typeMap[5] = { GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 }; -EtcTexture::EtcTexture() +QEtcTexture::QEtcTexture() : m_texture_id(0), m_uploaded(false) { initializeOpenGLFunctions(); } -EtcTexture::~EtcTexture() +QEtcTexture::~QEtcTexture() { if (m_texture_id) glDeleteTextures(1, &m_texture_id); } -int EtcTexture::textureId() const +int QEtcTexture::textureId() const { if (m_texture_id == 0) { - EtcTexture *texture = const_cast<EtcTexture*>(this); + QEtcTexture *texture = const_cast<QEtcTexture*>(this); texture->glGenTextures(1, &texture->m_texture_id); } return m_texture_id; } -bool EtcTexture::hasAlphaChannel() const +bool QEtcTexture::hasAlphaChannel() const { return m_type == GL_COMPRESSED_RGBA8_ETC2_EAC || m_type == GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2; } -void EtcTexture::bind() +void QEtcTexture::bind() { if (m_uploaded && m_texture_id) { glBindTexture(GL_TEXTURE_2D, m_texture_id); @@ -158,7 +158,7 @@ public: int textureByteCount() const { return m_data.size(); } QSGTexture *createTexture(QQuickWindow *) const { - EtcTexture *texture = new EtcTexture; + QEtcTexture *texture = new QEtcTexture; texture->m_data = m_data; texture->m_size = m_size; texture->m_paddedSize = m_paddedSize; diff --git a/src/quick/scenegraph/compressedtexture/qsgpkmhandler_p.h b/src/quick/scenegraph/compressedtexture/qsgpkmhandler_p.h index 77097cb80a..eb6b2e46c0 100644 --- a/src/quick/scenegraph/compressedtexture/qsgpkmhandler_p.h +++ b/src/quick/scenegraph/compressedtexture/qsgpkmhandler_p.h @@ -66,12 +66,12 @@ public: QQuickTextureFactory *read(QIODevice *device); }; -class EtcTexture : public QSGTexture, protected QOpenGLFunctions +class QEtcTexture : public QSGTexture, protected QOpenGLFunctions { Q_OBJECT public: - EtcTexture(); - ~EtcTexture(); + QEtcTexture(); + ~QEtcTexture(); void bind(); |