diff --git a/Alpha_shapes_3/demo/Alpha_shapes_3/Viewer.cpp b/Alpha_shapes_3/demo/Alpha_shapes_3/Viewer.cpp index e276df8661e..dd13883e3df 100644 --- a/Alpha_shapes_3/demo/Alpha_shapes_3/Viewer.cpp +++ b/Alpha_shapes_3/demo/Alpha_shapes_3/Viewer.cpp @@ -29,14 +29,14 @@ void Viewer::compile_shaders() //Vertex source code const char vertex_source[] = { - "#version 330 \n" + "#version 120 \n" "in highp vec4 vertex;\n" "in highp vec3 normal;\n" "uniform highp mat4 mvp_matrix;\n" "uniform highp mat4 mv_matrix; \n" - "out highp vec4 fP; \n" - "out highp vec3 fN; \n" + "varying highp vec4 fP; \n" + "varying highp vec3 fN; \n" "void main(void)\n" "{\n" " fP = mv_matrix * vertex; \n" @@ -47,7 +47,7 @@ void Viewer::compile_shaders() //Vertex source code const char fragment_source[] = { - "#version 330 \n" + "#version 120 \n" "in highp vec4 fP; \n" "in highp vec3 fN; \n" "uniform highp vec4 color; \n" @@ -105,7 +105,7 @@ rendering_program.bind(); //Vertex source code const char vertex_source_points[] = { - "#version 330 \n" + "#version 120 \n" "in highp vec4 vertex;\n" "uniform highp mat4 mvp_matrix;\n" @@ -117,7 +117,7 @@ const char vertex_source_points[] = //Vertex source code const char fragment_source_points[] = { - "#version 330 \n" + "#version 120 \n" "uniform highp vec4 color; \n" "void main(void) { \n" diff --git a/Alpha_shapes_3/demo/Alpha_shapes_3/Viewer.h b/Alpha_shapes_3/demo/Alpha_shapes_3/Viewer.h index a5cc54aa490..5280aa622b3 100644 --- a/Alpha_shapes_3/demo/Alpha_shapes_3/Viewer.h +++ b/Alpha_shapes_3/demo/Alpha_shapes_3/Viewer.h @@ -3,13 +3,13 @@ #include "typedefs.h" #include -#include +#include #include #include #include -class Viewer : public QGLViewer, protected QOpenGLFunctions_3_3_Core{ +class Viewer : public QGLViewer, protected QOpenGLFunctions_2_1{ Q_OBJECT CGAL::Timer timer; diff --git a/GraphicsView/include/CGAL/Qt/CreateOpenGLContext.h b/GraphicsView/include/CGAL/Qt/CreateOpenGLContext.h index 514b6e8007e..7e321582f36 100644 --- a/GraphicsView/include/CGAL/Qt/CreateOpenGLContext.h +++ b/GraphicsView/include/CGAL/Qt/CreateOpenGLContext.h @@ -27,7 +27,7 @@ inline QGLContext* createOpenGLContext() { QOpenGLContext *context = new QOpenGLContext(); QSurfaceFormat format; - format.setVersion(3,3); + format.setVersion(2,1); format.setProfile(QSurfaceFormat::CompatibilityProfile); context->setFormat(format); return QGLContext::fromOpenGLContext(context);