Fix upside down pixmaps on older Qt setups

This commit is contained in:
Mark Watkins 2013-01-19 00:03:58 +10:00
parent 75cb7498fb
commit ff68433fba
3 changed files with 4 additions and 4 deletions

View File

@ -847,7 +847,7 @@ void gToolTip::paint() //actually paints it.
painter.end(); painter.end();
if (usepixmap) { if (usepixmap) {
m_textureID=m_graphview->bindTexture(m_pixmap); m_textureID=m_graphview->bindTexture(m_pixmap,GL_TEXTURE_2D,GL_RGBA,QGLContext::InvertedYBindOption);
m_invalidate=false; m_invalidate=false;
} }
} }
@ -2338,7 +2338,7 @@ void gGraphView::DrawTextQue()
pc->pixmap=pm; pc->pixmap=pm;
pixmap_cache_size+=pm->width()*pm->height()*(pm->depth()/8); pixmap_cache_size+=pm->width()*pm->height()*(pm->depth()/8);
pc->textureID=bindTexture(*pm); pc->textureID=bindTexture(*pm,GL_TEXTURE_2D,GL_RGBA,QGLContext::InvertedYBindOption);
pixmap_cache[hstr]=pc; pixmap_cache[hstr]=pc;
} }

View File

@ -247,7 +247,7 @@ void gXAxis::paint(gGraph & w,int left,int top, int width, int height)
if (usepixmap) { if (usepixmap) {
painter.end(); painter.end();
m_textureID=w.graphView()->bindTexture(m_pixmap); m_textureID=w.graphView()->bindTexture(m_pixmap,GL_TEXTURE_2D,GL_RGBA,QGLContext::InvertedYBindOption);
} }
w.invalidate_xAxisImage=false; w.invalidate_xAxisImage=false;

View File

@ -250,7 +250,7 @@ void gYAxis::paint(gGraph & w,int left,int top, int width, int height)
} }
paint.end(); paint.end();
//yAxisImage=QGLWidget::convertToGLFormat(pixmap.toImage().mirrored(false,true)); //yAxisImage=QGLWidget::convertToGLFormat(pixmap.toImage().mirrored(false,true));
yAxisImageTex=w.graphView()->bindTexture(yAxisImage); yAxisImageTex=w.graphView()->bindTexture(yAxisImage,GL_TEXTURE_2D,GL_RGBA,QGLContext::InvertedYBindOption);
w.invalidate_yAxisImage=false; w.invalidate_yAxisImage=false;
} }