Commit ad717b74 authored by Oliver Bock's avatar Oliver Bock

More GL context format checks

parent d2b4fcfc
......@@ -26,14 +26,20 @@ PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) :
QGLWidget(QGLFormat(QGL::AlphaChannel | QGL::SampleBuffers), parent),
m_frameTimer()
{
if(!format().directRendering()) {
qWarning("Sorry, no direct rendering support for animation...");
}
if(!format().doubleBuffer()) {
qWarning("Sorry, no double buffering support for animation...");
}
if(!format().rgba()) {
qWarning("Sorry, no RGBA support...");
qWarning("Sorry, no RGBA support for animation...");
}
if(!format().alpha()) {
qWarning("Sorry, no alpha channel support...");
qWarning("Sorry, no alpha channel support for animation...");
}
if(!format().sampleBuffers()) {
qWarning("Sorry, no multisampling support...");
qWarning("Sorry, no multisampling support for animation...");
}
connect(&m_frameTimer, SIGNAL(timeout()), this, SLOT(updateFrame()));
......
......@@ -25,10 +25,27 @@ PulseScopeWidget::PulseScopeWidget(QWidget *parent) : QGraphicsView(parent),
m_data(),
m_marker()
{
setViewport(new QGLWidget(QGLFormat(QGL::AlphaChannel | QGL::SampleBuffers)));
QGLWidget *glScope = (QGLWidget*) viewport();
if(!glScope->format().directRendering()) {
qWarning("Sorry, no direct rendering support for pulse scope...");
}
if(!glScope->format().doubleBuffer()) {
qWarning("Sorry, no double buffering support for pulse scope...");
}
if(!glScope->format().rgba()) {
qWarning("Sorry, no RGBA support for pulse scope...");
}
if(!glScope->format().alpha()) {
qWarning("Sorry, no alpha channel support for pulse scope...");
}
if(!glScope->format().sampleBuffers()) {
qWarning("Sorry, no multisampling support for pulse scope...");
}
m_scopeSizeH = 360;
m_scopeSizeV = 0;
setViewport(new QGLWidget(QGLFormat(QGL::AlphaChannel | QGL::SampleBuffers)));
setScene(&m_scene);
m_data.fill(0.0f, m_scopeSizeH);
m_marker.setPen(QPen(Qt::red));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment