diff --git a/Apps/Examples/viewer.cpp b/Apps/Examples/viewer.cpp index a566c24c360cd015d59064db50fa9954b176a7ff..551c7b4bd6090dbc6ac1dec5d6895189920b9cff 100644 --- a/Apps/Examples/viewer.cpp +++ b/Apps/Examples/viewer.cpp @@ -78,7 +78,9 @@ void Viewer::initGUI() void Viewer::cb_initGL() { - Utils::GLSLShader::setCurrentOGLVersion(2) ; + Utils::GLSLShader::setCurrentOGLVersion(3) ; + CGoGNout << "GL VERSION = "<< glGetString(GL_VERSION)<< CGoGNendl; + Utils::GLSLShader::areShadersSupported(); m_render = new Algo::Render::GL2::MapRender() ; m_topoRender = new Algo::Render::GL2::TopoRenderMap() ; diff --git a/Apps/Examples/volumeExplorer.cpp b/Apps/Examples/volumeExplorer.cpp index 023213b394aee82ff55742a078065d141fe5adff..208639175f49980c9b153a0c2bbe759ab8dd9f46 100644 --- a/Apps/Examples/volumeExplorer.cpp +++ b/Apps/Examples/volumeExplorer.cpp @@ -206,6 +206,8 @@ void MyQT::cb_initGL() { // choose to use GL version 2 Utils::GLSLShader::setCurrentOGLVersion(2); + CGoGNout << "GL VERSION = "<< glGetString(GL_VERSION)<< CGoGNendl; + Utils::GLSLShader::areShadersSupported(); // create the renders m_topo_render = new Algo::Render::GL2::Topo3RenderMap(); diff --git a/include/Algo/Topo/Map2/uniformOrientation.hpp b/include/Algo/Topo/Map2/uniformOrientation.hpp index ce016a0df623cfe24d3abd44551f548869a4f8f9..b52e1dc260042e763f2431a20216748f0c9bf606 100644 --- a/include/Algo/Topo/Map2/uniformOrientation.hpp +++ b/include/Algo/Topo/Map2/uniformOrientation.hpp @@ -106,7 +106,7 @@ void uniformOrientationCC(MAP& map, Dart faceSeed) DartMarker cmf(map); - cmf.markOrbit(faceSeed); + cmf.template markOrbit(faceSeed); propag.push_back(faceSeed); while (!propag.empty() || !propag_inv.empty()) @@ -120,7 +120,7 @@ void uniformOrientationCC(MAP& map, Dart faceSeed) do { Dart e = map.phi2(d); - if (map.isBoundaryMarked2(e)) + if (map.template isBoundaryMarked<2>(e)) { e = findOtherInCouplesOfDarts(couples,d); if (e!=NIL) @@ -129,7 +129,7 @@ void uniformOrientationCC(MAP& map, Dart faceSeed) { propag_inv.push_back(e); face2invert.push_back(e); - cmf.markOrbit(e); + cmf.template markOrbit(e); } cmf.mark(map.phi2(e));// use cmf also to mark boudary cycle to invert } @@ -140,7 +140,7 @@ void uniformOrientationCC(MAP& map, Dart faceSeed) if (!cmf.isMarked(e)) { propag.push_back(e); - cmf.markOrbit(e); + cmf.template markOrbit(e); } } d= map.phi1(d); @@ -157,7 +157,7 @@ void uniformOrientationCC(MAP& map, Dart faceSeed) do { Dart e = map.phi2(d); - if (map.isBoundaryMarked2(e)) + if (map.template isBoundaryMarked<2>(e)) { e = findOtherInCouplesOfDarts(couples,d); if (e!=NIL) @@ -165,7 +165,7 @@ void uniformOrientationCC(MAP& map, Dart faceSeed) if (!cmf.isMarked(e)) { propag.push_back(e); - cmf.markOrbit(e); + cmf.template markOrbit(e); } cmf.mark(map.phi2(d));// use cmf also to mark boudary cycle to invert } @@ -176,7 +176,7 @@ void uniformOrientationCC(MAP& map, Dart faceSeed) { propag_inv.push_back(e); face2invert.push_back(e); - cmf.markOrbit(e); + cmf.template markOrbit(e); } } d= map.phi1(d); // traverse all edges of face @@ -195,7 +195,7 @@ void uniformOrientationCC(MAP& map, Dart faceSeed) if (cmf.isMarked(e)) // check cmf for wrong orientation { reverse2MapFaceKeepPhi2(map,e); - cmf.unmarkOrbit(e); + cmf.template unmarkOrbit(e); } } diff --git a/src/Utils/GLSLShader.cpp b/src/Utils/GLSLShader.cpp index 605eb66270eb76d5d9db32c2525f5de3916f4c07..5948a9d65da353eedfa774c11325251badc403d7 100644 --- a/src/Utils/GLSLShader.cpp +++ b/src/Utils/GLSLShader.cpp @@ -148,10 +148,35 @@ bool GLSLShader::areGeometryShadersSupported() bool GLSLShader::areShadersSupported() { - if ( ! glewGetExtension("GL_ARB_vertex_shader")) return false; - if ( ! glewGetExtension("GL_ARB_fragment_shader")) return false; - if ( ! glewGetExtension("GL_ARB_shader_objects")) return false; - if ( ! glewGetExtension("GL_ARB_shading_language_100")) return false; + if ( ! glewIsSupported("GL_ARB_vertex_shader")) + { + CGoGNerr << " vertex shaders not supported!" <