Skip to content

Commit

Permalink
Setting default surface format
Browse files Browse the repository at this point in the history
As suggested by the principal developer of OpenScenegGraph in the
following thread

  https://groups.google.com/forum/#!msg/osg-users/A89jTUGq4VY/RsmqvF1JAwAJ

I am now setting a default profile for the Qt application to force usage
of OpenGL 2.1. I am not sure whether this may solve issue #4, but let's
give it a try.
  • Loading branch information
Pseudomanifold committed Jun 28, 2017
1 parent 759d4f5 commit edb6992
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions QtOSG.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
#include "MainWindow.h"

#include <QApplication>
#include <QSurfaceFormat>

int main( int argc, char** argv )
{
QApplication application( argc, argv );

QSurfaceFormat format;
format.setVersion(2, 1);
format.setProfile( QSurfaceFormat::CompatibilityProfile );

QSurfaceFormat::setDefaultFormat(format);

MainWindow mainWindow;
mainWindow.show();

Expand Down

0 comments on commit edb6992

Please sign in to comment.