summaryrefslogtreecommitdiffstats
path: root/src/datavisualization/engine/surface3drenderer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/datavisualization/engine/surface3drenderer.cpp')
-rw-r--r--src/datavisualization/engine/surface3drenderer.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/datavisualization/engine/surface3drenderer.cpp b/src/datavisualization/engine/surface3drenderer.cpp
index 9cfa0edc..9fa1eeb8 100644
--- a/src/datavisualization/engine/surface3drenderer.cpp
+++ b/src/datavisualization/engine/surface3drenderer.cpp
@@ -317,8 +317,12 @@ void Surface3DRenderer::updateSurfaceTextures(QVector<QSurface3DSeries *> series
const QSurfaceDataArray &array = *dataProxy->array();
if (!series->texture().isNull()) {
- cache->setSurfaceTexture(m_textureHelper->create2DTexture(
- series->texture(), true, true, true));
+ GLuint texId = m_textureHelper->create2DTexture(series->texture(),
+ true, true, true, true);
+ glBindTexture(GL_TEXTURE_2D, texId);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glBindTexture(GL_TEXTURE_2D, 0);
+ cache->setSurfaceTexture(texId);
if (cache->isFlatShadingEnabled())
cache->surfaceObject()->coarseUVs(array, cache->dataArray());