Commit 1e7b36af authored by schultz's avatar schultz
Browse files

Merge branch 'featureCoreProfile' of...

Merge branch 'featureCoreProfile' of https://www.graphics.rwth-aachen.de:9000/OpenFlipper-Free/OpenFlipper into featureCoreProfile
parents 3f653282 35fc6e83
...@@ -98,6 +98,20 @@ ...@@ -98,6 +98,20 @@
//== IMPLEMENTATION ========================================================== //== IMPLEMENTATION ==========================================================
namespace {
void recreateContext()
{
#ifdef WIN32
QOpenGLContext* ctx = QOpenGLContext::currentContext();
QSurfaceFormat format = QSurfaceFormat::defaultFormat();
ctx->setFormat(format);
ctx->create();
QOffscreenSurface* surface = new QOffscreenSurface();
ctx->makeCurrent(surface);
#endif
}
}
/** \brief Constuctor for the Core Widget ( This is stage 1 , call init for stage 2) /** \brief Constuctor for the Core Widget ( This is stage 1 , call init for stage 2)
* *
* Initialization is working the following way:\n * Initialization is working the following way:\n
...@@ -653,6 +667,7 @@ Core::init() { ...@@ -653,6 +667,7 @@ Core::init() {
coreWidget_->splitter_->restoreState (windowStates.value("Core/LogSplitter").toByteArray ()); coreWidget_->splitter_->restoreState (windowStates.value("Core/LogSplitter").toByteArray ());
coreWidget_->show(); coreWidget_->show();
recreateContext();
applyOptions(); applyOptions();
...@@ -671,6 +686,8 @@ Core::init() { ...@@ -671,6 +686,8 @@ Core::init() {
} else { } else {
coreWidget_->show(); coreWidget_->show();
recreateContext();
applyOptions(); applyOptions();
} }
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
- Queued cross plugin interconnection feature - Queued cross plugin interconnection feature
- Use QOpenGLWidget - Use QOpenGLWidget
- Switched to Qt command line parsing and removed SimpleOpt - Switched to Qt command line parsing and removed SimpleOpt
- Fix clang warning by avoiding GNU extension
- Do not automatically save file immediately after loading with ctrl-o
- <b>ACG</b> - <b>ACG</b>
- Clamp shininess in Materialnode (caused GL Errors) - Clamp shininess in Materialnode (caused GL Errors)
- Better Material support in Materialnode (emissive and refractive materials) - Better Material support in Materialnode (emissive and refractive materials)
......
...@@ -151,7 +151,7 @@ public: ...@@ -151,7 +151,7 @@ public:
char* offset(unsigned int _offset) const char* offset(unsigned int _offset) const
{ {
return ((char*)NULL + _offset); return reinterpret_cast<char*>(_offset);
} }
GLuint id() const {return vbo;} GLuint id() const {return vbo;}
......
...@@ -956,7 +956,11 @@ CoreWidget::updateRecent() ...@@ -956,7 +956,11 @@ CoreWidget::updateRecent()
} }
} }
// Workaround for QMenu issue on MacOS: https://bugreports.qt.io/browse/QTBUG-63848
// Without this, the recent files menu entries are all disabled after using the menu once:
// https://www.graphics.rwth-aachen.de:9000/OpenFlipper-Free/OpenFlipper-Free/issues/139
recentFilesMenu_->setEnabled(false);
recentFilesMenu_->setEnabled(true);
} }
void void
......
...@@ -605,6 +605,7 @@ void CoreWidget::coreKeyPressEvent (QKeyEvent* _e){ ...@@ -605,6 +605,7 @@ void CoreWidget::coreKeyPressEvent (QKeyEvent* _e){
case Qt::Key_O : case Qt::Key_O :
loadMenu(); loadMenu();
return;
case Qt::Key_S : case Qt::Key_S :
saveMenu(); saveMenu();
......
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