Commit c5f24a4f authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

* Fixed QGLWidget not being made current again after calling swapBuffers().

* Removed obsolete XInitThreads() from main function, since this is handled by Qt when constructing CampvisApplication.
parent 62bf8ec5
......@@ -24,10 +24,6 @@
#include "application/campvisapplication.h"
#ifdef Q_WS_X11
#include <X11/Xlib.h>
#endif
using namespace campvis;
/**
......@@ -38,10 +34,6 @@ using namespace campvis;
* \return 0 if program exited successfully
**/
int main(int argc, char** argv) {
#ifdef Q_WS_X11
XInitThreads();
#endif
CampVisApplication app(argc, argv);
app.init();
int toReturn = app.run();
......
......@@ -105,6 +105,7 @@ void QtCanvas::update() {
void QtCanvas::swap() {
QGLWidget::swapBuffers();
this->makeCurrent();
}
void QtCanvas::toggleFullScreen() {
......
......@@ -45,10 +45,6 @@
#include "core/tools/simplejobprocessor.h"
#include "core/tools/quadrenderer.h"
#ifdef Q_WS_X11
#include <X11/Xlib.h>
#endif
QApplication *app;
/// Flag, whether CampVisApplication was correctly initialized
bool _initialized;
......@@ -144,10 +140,6 @@ void deinit() {
GTEST_API_ int main(int argc, char **argv) {
printf("Running main() from main.cpp\n");
#ifdef Q_WS_X11
XInitThreads();
#endif
app = new QApplication(argc, argv);
// Make Xlib and GLX thread safe under X11
......
Supports Markdown
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