Removed obsolete opengl module
This commit is contained in:
@@ -101,12 +101,16 @@ MapView3D::MapView3D(QWidget *parent) : QOpenGLWidget(parent) {
|
||||
grabGesture(Qt::PanGesture);
|
||||
grabGesture(Qt::PinchGesture);
|
||||
|
||||
auto format = QSurfaceFormat();
|
||||
//format.setVersion(4,3);
|
||||
format.setSamples(2);
|
||||
//format.setProfile(QSurfaceFormat::CoreProfile);
|
||||
auto format = QSurfaceFormat();
|
||||
format.setVersion(3,3);
|
||||
//format.setSamples(2);
|
||||
auto ver = format.version();
|
||||
|
||||
setFormat(format);
|
||||
std::cout << ver.first << " " << ver.second << std::endl;
|
||||
format.setProfile(QSurfaceFormat::CoreProfile);
|
||||
format.setOption(QSurfaceFormat::DebugContext);
|
||||
|
||||
setFormat(format);
|
||||
|
||||
}
|
||||
|
||||
@@ -116,6 +120,7 @@ void MapView3D::initializeGL() {
|
||||
//setFormat(QGLFormat(QGL::SampleBuffers));
|
||||
|
||||
QOpenGLWidget::initializeGL();
|
||||
initializeOpenGLFunctions();
|
||||
|
||||
// this should be the default!!
|
||||
glCullFace(GL_BACK);
|
||||
@@ -124,8 +129,7 @@ void MapView3D::initializeGL() {
|
||||
|
||||
// additional settings
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glClearColor(0.9, 0.9, 1.0, 1.0);
|
||||
|
||||
glClearColor(0.5, 0.5, 0.5, 1.0);
|
||||
}
|
||||
|
||||
void MapView3D::paintGL() {
|
||||
@@ -283,7 +287,7 @@ void MapView3D::layerChange() {
|
||||
|
||||
void MapView3D::draw() {
|
||||
|
||||
static RenderSettings rs = RenderSettings(new Shader());
|
||||
static RenderSettings rs = RenderSettings(new Shader(), this);
|
||||
|
||||
// view
|
||||
QMatrix4x4 V;
|
||||
|
||||
Reference in New Issue
Block a user