Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
fdfe04b5
Commit
fdfe04b5
authored
Feb 07, 2011
by
Sebastian Eichelbaum
Browse files
[ADD] - added GLFormat for qtglwidget.
parent
50c9c6d1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
src/gui/qt4/platformDependent/WQtGLWidgetAll.cpp
src/gui/qt4/platformDependent/WQtGLWidgetAll.cpp
+9
-1
src/gui/qt4/platformDependent/WQtGLWidgetAll.h
src/gui/qt4/platformDependent/WQtGLWidgetAll.h
+8
-0
No files found.
src/gui/qt4/platformDependent/WQtGLWidgetAll.cpp
View file @
fdfe04b5
...
...
@@ -47,7 +47,7 @@ typedef osgViewer::GraphicsWindowWin32::WindowData WindowData;
WQtGLWidgetAll
::
WQtGLWidgetAll
(
std
::
string
nameOfViewer
,
QWidget
*
parent
,
WGECamera
::
ProjectionMode
projectionMode
,
const
QGLWidget
*
shareWidget
)
:
QGLWidget
(
parent
,
shareWidget
),
:
QGLWidget
(
getDefaultFormat
(),
parent
,
shareWidget
),
m_nameOfViewer
(
nameOfViewer
),
m_recommendedSize
()
{
...
...
@@ -243,3 +243,11 @@ void WQtGLWidgetAll::reset()
{
m_Viewer
->
reset
();
}
const
QGLFormat
WQtGLWidgetAll
::
getDefaultFormat
()
{
QGLFormat
format
;
format
.
setSwapInterval
(
1
);
// according to Qt Doc, this should enable VSync. But it doesn't.
return
format
;
}
src/gui/qt4/platformDependent/WQtGLWidgetAll.h
View file @
fdfe04b5
...
...
@@ -30,6 +30,7 @@
#include <QtCore/QTimer>
#include <QtGui/QWidget>
#include <QtOpenGL/QGLWidget>
#include <QtOpenGL/QGLFormat>
#include <boost/shared_ptr.hpp>
#include <boost/signals2/signal.hpp>
...
...
@@ -115,6 +116,13 @@ public:
*/
boost
::
shared_ptr
<
WGEViewer
>
getViewer
()
const
;
/**
* Creates and returns a default OpenGL format description with vertical sync enabled.
*
* \return the format descriptor
*/
static
const
QGLFormat
getDefaultFormat
();
public
slots
:
/**
* Resets the contained view using the installed manipulator.
...
...
Write
Preview
Markdown
is supported
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