Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
einsteinathome
pulsatingscience
Commits
ad717b74
Commit
ad717b74
authored
Jan 28, 2009
by
Oliver Bock
Browse files
More GL context format checks
parent
d2b4fcfc
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/pulsaranimationwidget.cpp
View file @
ad717b74
...
...
@@ -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
()));
...
...
src/pulsescopewidget.cpp
View file @
ad717b74
...
...
@@ -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.0
f
,
m_scopeSizeH
);
m_marker
.
setPen
(
QPen
(
Qt
::
red
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment