disabled anti-aliasing from FlowGL until a solution for using glReadPixels will be found

This commit is contained in:
Luis Ángel San Martín 2015-01-13 19:57:00 +01:00
parent b9cc52bf23
commit ef74b04fcb

View File

@ -241,7 +241,7 @@ YACReaderFlowGL::YACReaderFlowGL(QWidget *parent,struct Preset p)
QSurfaceFormat f = format();
//TODO add antialiasing
f.setSamples(4);
//f.setSamples(4);
f.setVersion(2, 1);
f.setSwapInterval(0);
setFormat(f);
@ -1084,6 +1084,7 @@ void YACReaderFlowGL::keyPressEvent(QKeyEvent *event)
void YACReaderFlowGL::mousePressEvent(QMouseEvent *event)
{
makeCurrent();
if(event->button() == Qt::LeftButton)
{
float x,y;
@ -1101,7 +1102,8 @@ void YACReaderFlowGL::mousePressEvent(QMouseEvent *event)
winX = (float)x;
winY = (float)viewport[3] - (float)y;
glReadPixels( x, int(winY), 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &winZ );
glReadPixels(winX, int(winY), 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &winZ );
gluUnProject(winX, winY, winZ, modelview, projection, viewport, &posX, &posY, &posZ);
@ -1117,10 +1119,12 @@ void YACReaderFlowGL::mousePressEvent(QMouseEvent *event)
showPrevious();
} else
QOpenGLWidget::mousePressEvent(event);
doneCurrent();
}
void YACReaderFlowGL::mouseDoubleClickEvent(QMouseEvent* event)
{
makeCurrent();
float x,y;
x = event->x();
y = event->y();
@ -1145,7 +1149,7 @@ void YACReaderFlowGL::mouseDoubleClickEvent(QMouseEvent* event)
emit selected(centerIndex());
event->accept();
}
doneCurrent();
}
YACReaderComicFlowGL::YACReaderComicFlowGL(QWidget *parent,struct Preset p )