From e854c3ea06fc1ea5bff31764862b301751836592 Mon Sep 17 00:00:00 2001
From: Ansgar Philippsen <ansgar.philippsen@gmail.com>
Date: Mon, 11 Oct 2010 15:03:16 -0400
Subject: [PATCH] fixes to previous merge for working compile

---
 modules/gfx/pymod/export_gfx_obj.cc          |  4 +--
 modules/gfx/pymod/export_render_options.cc   | 10 +++---
 modules/gfx/src/bitmap_io.cc                 | 12 +++----
 modules/gfx/src/entity.cc                    |  4 +--
 modules/gfx/src/gfx_object.cc                | 18 +++++-----
 modules/gfx/src/gfx_test_object.cc           |  2 +-
 modules/gfx/src/gl_helper.hh                 |  2 +-
 modules/gfx/src/impl/cartoon_renderer.cc     | 18 +++++-----
 modules/gfx/src/impl/entity_detail.cc        | 10 +++---
 modules/gfx/src/impl/glx_offscreen_buffer.cc |  4 +--
 modules/gfx/src/impl/scene_fx.cc             |  8 ++---
 modules/gfx/src/map_iso.cc                   |  2 +-
 modules/gfx/src/map_slab.hh                  |  2 +-
 modules/gfx/src/scene.cc                     | 38 ++++++++++----------
 modules/gfx/src/shader.cc                    |  2 +-
 modules/gfx/src/vertex_array.cc              |  2 +-
 modules/gui/src/gl_win.cc                    | 10 +++---
 modules/gui/src/tools/map_tool.cc            |  5 +--
 modules/mol/base/src/query_view_wrapper.cc   | 20 +++++------
 19 files changed, 86 insertions(+), 87 deletions(-)

diff --git a/modules/gfx/pymod/export_gfx_obj.cc b/modules/gfx/pymod/export_gfx_obj.cc
index 6210c9c98..565ef921a 100644
--- a/modules/gfx/pymod/export_gfx_obj.cc
+++ b/modules/gfx/pymod/export_gfx_obj.cc
@@ -50,12 +50,12 @@ namespace {
 
   void set_outline(GfxObjBase* b, bool f)
   {
-    LOGN_MESSAGE("Outline(bool) is deprecated, use SetOutline(bool) instead");
+    LOG_INFO("Outline(bool) is deprecated, use SetOutline(bool) instead");
     b->SetOutline(f);
   }
   void set_aalines(GfxObjBase* b, bool f)
   {
-    LOGN_MESSAGE("AALines(bool) is deprecated, use SetAALines(bool) instead");
+    LOG_INFO("AALines(bool) is deprecated, use SetAALines(bool) instead");
     b->SetAALines(f);
   }
 }
diff --git a/modules/gfx/pymod/export_render_options.cc b/modules/gfx/pymod/export_render_options.cc
index 6cdc169a6..b3bfacdd4 100644
--- a/modules/gfx/pymod/export_render_options.cc
+++ b/modules/gfx/pymod/export_render_options.cc
@@ -80,10 +80,12 @@ void export_RenderOptions()
     .def("GetSphereDetail", &CPKRenderOptions::GetSphereDetail)
     .def("SetSphereMode", &CPKRenderOptions::SetSphereMode)
     .def("GetSphereMode", &CPKRenderOptions::GetSphereMode)
-    .def("SetCPKMode", &CPKRenderOptions::SetCPKMode)
-    .def("GetCPKMode", &CPKRenderOptions::GetCPKMode)
-    .add_property("cpk_mode", &CPKRenderOptions::GetCPKMode, 
-                  &CPKRenderOptions::SetCPKMode)
+    .def("SetCPKMode", &CPKRenderOptions::SetSphereMode)
+    .def("GetCPKMode", &CPKRenderOptions::GetSphereMode)
+    .add_property("cpk_mode", &CPKRenderOptions::GetSphereMode, 
+                  &CPKRenderOptions::SetSphereMode)
+    .add_property("sphere_mode", &CPKRenderOptions::GetSphereMode, 
+                  &CPKRenderOptions::SetSphereMode)
     .add_property("sphere_detail", &CPKRenderOptions::GetSphereDetail, 
                   &CPKRenderOptions::SetSphereDetail)
   ;
diff --git a/modules/gfx/src/bitmap_io.cc b/modules/gfx/src/bitmap_io.cc
index fedb463af..8117d4cc4 100644
--- a/modules/gfx/src/bitmap_io.cc
+++ b/modules/gfx/src/bitmap_io.cc
@@ -39,7 +39,7 @@ void export_png(const String& filename, unsigned int width, unsigned int height,
     return;
   }
 
-  LOGN_DEBUG("creating png write struct");
+  LOG_DEBUG("creating png write struct");
   png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING,
                                                 NULL, NULL, NULL);
   if (png_ptr == NULL) {
@@ -48,7 +48,7 @@ void export_png(const String& filename, unsigned int width, unsigned int height,
     return;
   }
   
-  LOGN_DEBUG("creating png info struct");
+  LOG_DEBUG("creating png info struct");
   png_infop info_ptr = png_create_info_struct(png_ptr);
   if (info_ptr == NULL) {
     fclose(fp);
@@ -74,24 +74,24 @@ void export_png(const String& filename, unsigned int width, unsigned int height,
                PNG_INTERLACE_NONE,
                PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
   
-  LOGN_DEBUG("writing png info");
+  LOG_DEBUG("writing png info");
   png_write_info(png_ptr, info_ptr);
   
   png_bytep* row_pointers = new png_bytep[height];
 
   png_byte* png_data = data;
 
-  LOGN_DEBUG("assigning png row pointers");
+  LOG_DEBUG("assigning png row pointers");
   for(uint i=0;i<height;++i){
     row_pointers[height-i-1]=&png_data[i*4*width];
   }
 
-  LOGN_DEBUG("writing png image");
+  LOG_DEBUG("writing png image");
   png_write_image(png_ptr, row_pointers);
 
   delete []row_pointers;
 
-  LOGN_DEBUG("finalizing png write");
+  LOG_DEBUG("finalizing png write");
   png_write_end(png_ptr, info_ptr);
   
   png_destroy_write_struct(&png_ptr, (png_infopp)NULL);
diff --git a/modules/gfx/src/entity.cc b/modules/gfx/src/entity.cc
index 475b3b218..0c5f06837 100644
--- a/modules/gfx/src/entity.cc
+++ b/modules/gfx/src/entity.cc
@@ -67,7 +67,7 @@ Entity::Entity(const String& name,
                const Query& q,
                QueryFlags f):
   GfxObj(name),
-  qv_(q, h, f),
+  qv_(q, f, h),
   bbox_(geom::Vec3(), geom::Vec3()),
   sel_(),
   sel_update_(),
@@ -86,7 +86,7 @@ Entity::Entity(const String& name,
                const Query& q,
                QueryFlags f):
   GfxObj(name),
-  qv_(q, h, f),
+  qv_(q, f, h),
   bbox_(geom::Vec3(), geom::Vec3()),
   sel_(),
   sel_update_(),
diff --git a/modules/gfx/src/gfx_object.cc b/modules/gfx/src/gfx_object.cc
index 0451739c2..e151ccd9e 100644
--- a/modules/gfx/src/gfx_object.cc
+++ b/modules/gfx/src/gfx_object.cc
@@ -102,11 +102,11 @@ void GfxObj::DeepSwap(GfxObj& go)
 
 void GfxObj::RenderGL(RenderPass pass)
 {
-  LOGN_TRACE("object " << GetName() << ": RenderGL()");
+  LOG_TRACE("object " << GetName() << ": RenderGL()");
 
   if(pass==0) {
     if(mat_update_) {
-      LOGN_TRACE("updating material display list");
+      LOG_TRACE("updating material display list");
       if(mat_dlist_==0) {
         mat_dlist_=glGenLists(1);
       }
@@ -126,18 +126,18 @@ void GfxObj::RenderGL(RenderPass pass)
     }
   }
   if(IsVisible()) {
-    LOGN_TRACE("applying local transformation");
+    LOG_TRACE("applying local transformation");
     glMatrixMode(GL_MODELVIEW);
     glPushMatrix();
     glMultMatrix(transform_.GetTransposedMatrix().Data());
     if(Scene::Instance().InOffscreenMode()) {
-      LOGN_TRACE("applying material");
+      LOG_TRACE("applying material");
       mat_.RenderGL();
     } else {
-      LOGN_TRACE("applying material display list");
+      LOG_TRACE("applying material display list");
       glCallList(mat_dlist_);
     }
-    LOGN_TRACE("calling custom render gl pass " << pass);
+    LOG_TRACE("calling custom render gl pass " << pass);
 
     /*
       only STANDARD_RENDER_PASS and GLOW_RENDER_PASS are
@@ -163,7 +163,7 @@ void GfxObj::RenderGL(RenderPass pass)
     } else if(pass==GLOW_RENDER_PASS) {
       CustomRenderGL(GLOW_RENDER_PASS);
     } else if(pass==OVERLAY_RENDER_PASS) {
-      LOGN_TRACE("drawing labels");
+      LOG_TRACE("drawing labels");
       render_labels();
     }
 
@@ -337,7 +337,7 @@ void GfxObj::ColorBy(const mol::EntityView& ev,
                       const String& prop,
                       const Gradient& g, float minv, float maxv)
 {
-  LOGN_VERBOSE("ColorBy not implemented for this gfx object");
+  LOG_VERBOSE("ColorBy not implemented for this gfx object");
 }
 
 #if OST_IMG_ENABLED
@@ -345,7 +345,7 @@ void GfxObj::ColorBy(const img::MapHandle& mh,
                       const String& prop,
                       const Gradient& g, float minv, float maxv)
 {
-  LOGN_VERBOSE("ColorBy not implemented for this gfx object");
+  LOG_VERBOSE("ColorBy not implemented for this gfx object");
 }
 #endif
 
diff --git a/modules/gfx/src/gfx_test_object.cc b/modules/gfx/src/gfx_test_object.cc
index 71bae115a..69ae91439 100644
--- a/modules/gfx/src/gfx_test_object.cc
+++ b/modules/gfx/src/gfx_test_object.cc
@@ -63,7 +63,7 @@ GfxTestObj::GfxTestObj():
 
   Texture tex(BitmapImport(tex_file.string(),".png"));
   if(!tex.IsValid()) {
-    LOGN_ERROR("error loading " << tex_file.string());
+    LOG_ERROR("error loading " << tex_file.string());
   } else {
     LOG_DEBUG("importing tex with id " << tex_id);
     glBindTexture(GL_TEXTURE_2D, tex_id);
diff --git a/modules/gfx/src/gl_helper.hh b/modules/gfx/src/gl_helper.hh
index 11f87c94d..7370abbff 100644
--- a/modules/gfx/src/gl_helper.hh
+++ b/modules/gfx/src/gl_helper.hh
@@ -43,7 +43,7 @@ inline void check_gl_error()
 {
   GLenum error_code;
   if((error_code=glGetError())!=GL_NO_ERROR) {
-    LOGN_VERBOSE("GL error: " << gluErrorString(error_code));
+    LOG_VERBOSE("GL error: " << gluErrorString(error_code));
   }
 }
 
diff --git a/modules/gfx/src/impl/cartoon_renderer.cc b/modules/gfx/src/impl/cartoon_renderer.cc
index a8e1bd5cd..119f4a63a 100644
--- a/modules/gfx/src/impl/cartoon_renderer.cc
+++ b/modules/gfx/src/impl/cartoon_renderer.cc
@@ -57,7 +57,7 @@ void CartoonRenderer::PrepareRendering(const BackboneTrace& subset,
                                        bool)
 {
   if(options_==NULL) {
-    LOGN_DEBUG("CartoonRenderer: NULL options, not creating objects");
+    LOG_DEBUG("CartoonRenderer: NULL options, not creating objects");
   }
 
   va.Clear();
@@ -67,11 +67,11 @@ void CartoonRenderer::PrepareRendering(const BackboneTrace& subset,
   va.SetMode(0x4);
   va.SetPolyMode(options_->GetPolyMode());
 
-  LOGN_DEBUG("CartoonRenderer: starting object build");
+  LOG_DEBUG("CartoonRenderer: starting object build");
   int spline_detail=std::max((unsigned int) 1, options_->GetSplineDetail());
   SplineEntryListList tmp_sll;
   for (int node_list=0; node_list<subset.GetListCount(); ++node_list) {
-    LOGN_DEBUG("CartoonRenderer: collecting spline entries for node list " << node_list);
+    LOG_DEBUG("CartoonRenderer: collecting spline entries for node list " << node_list);
     // first build the spline
     SplineEntryList spl;
     const NodeEntryList& nl=subset.GetList(node_list);
@@ -95,13 +95,13 @@ void CartoonRenderer::PrepareRendering(const BackboneTrace& subset,
       ee.v1 = entry.v1;
       spl.push_back(ee);
     }
-    LOGN_DEBUG("CartoonRenderer: found " << spl.size() << " entries");
+    LOG_DEBUG("CartoonRenderer: found " << spl.size() << " entries");
     if(!spl.empty()) {
       tmp_sll.push_back(spl);
     }
   }
   if(!force_tube_) {
-    LOGN_DEBUG("CartoonRenderer: adjusting spline-entry-list lists for various modes");
+    LOG_DEBUG("CartoonRenderer: adjusting spline-entry-list lists for various modes");
     FudgeSplineObj(tmp_sll);
   }
   spline_list_list.clear();
@@ -111,7 +111,7 @@ void CartoonRenderer::PrepareRendering(const BackboneTrace& subset,
       // don't intpol cylinders
       spline_list_list.push_back(*sit);
     } else {
-      LOGN_DEBUG("CartoonRenderer: generating full spline for spline-entry-list " << tmp_count++);
+      LOG_DEBUG("CartoonRenderer: generating full spline for spline-entry-list " << tmp_count++);
       spline_list_list.push_back(Spline::Generate(*sit,spline_detail,options_->GetColorBlendMode()));
     }
   }
@@ -241,7 +241,7 @@ void CartoonRenderer::FudgeSplineObj(SplineEntryListList& olistlist)
   SplineEntryList nlist;
   
   for(unsigned int llc=0;llc<olistlist.size();++llc) {
-    LOGN_DEBUG("CartoonRenderer: fudging spline segment " << llc);
+    LOG_DEBUG("CartoonRenderer: fudging spline segment " << llc);
     SplineEntryList olist = olistlist[llc];
     for(unsigned int lc=0;lc<olist.size();++lc) {
       if(olist.at(lc).type==1) {
@@ -380,7 +380,7 @@ void CartoonRenderer::RebuildSplineObj(IndexedVertexArray& va,
                                        const SplineEntryListList& spline_list_list,
                                        bool is_sel)
 {
-  LOGN_DEBUG("CartoonRenderer: starting profile assembly");
+  LOG_DEBUG("CartoonRenderer: starting profile assembly");
   unsigned int detail = std::min(MAX_ARC_DETAIL,
                                  std::max(options_->GetArcDetail(),
                                  (unsigned int)1));
@@ -428,7 +428,7 @@ void CartoonRenderer::RebuildSplineObj(IndexedVertexArray& va,
     */
     SplineEntryList slist=*it;
     if(slist.empty()) continue;
-    LOGN_DEBUG("CartoonRenderer: assembling fragment " << tmp_count << " with " << slist.size() << " spline segments");
+    LOG_DEBUG("CartoonRenderer: assembling fragment " << tmp_count << " with " << slist.size() << " spline segments");
 
     if(slist.size()==2 && slist[0].type==6) {
       // make a cylinder
diff --git a/modules/gfx/src/impl/entity_detail.cc b/modules/gfx/src/impl/entity_detail.cc
index fb78ff377..813fbec8a 100644
--- a/modules/gfx/src/impl/entity_detail.cc
+++ b/modules/gfx/src/impl/entity_detail.cc
@@ -266,7 +266,7 @@ SplineEntryList Spline::Generate(const SplineEntryList& entry_list, int nsub, ui
     xc[c]=static_cast<float>(c);
   }
 
-  LOGN_DEBUG("SplineGenerate: interpolating spline entry components");
+  LOG_DEBUG("SplineGenerate: interpolating spline entry components");
   
   // create sublist with enough entries
   SplineEntryList sublist(ipsize);
@@ -303,7 +303,7 @@ SplineEntryList Spline::Generate(const SplineEntryList& entry_list, int nsub, ui
 
   SPLINE_ENTRY_INTERPOLATE(rad);
 
-  LOGN_DEBUG("SplineGenerate: assigning direction and normal components");
+  LOG_DEBUG("SplineGenerate: assigning direction and normal components");
   // assign direction and normal
   // entity trace has the same algorithm
 
@@ -367,7 +367,7 @@ SplineEntryList Spline::Generate(const SplineEntryList& entry_list, int nsub, ui
     sublist.at(i).normal = sublist.at(i).v0;
   }
 
-  LOGN_DEBUG("SplineGenerate: assigning non-interpolated entry components");
+  LOG_DEBUG("SplineGenerate: assigning non-interpolated entry components");
   // finally the non-interpolated type
   // with some tweaks for proper strand rendering
   // part of this probably belongs into cartoon renderer
@@ -408,7 +408,7 @@ SplineEntryList Spline::Generate(const SplineEntryList& entry_list, int nsub, ui
 
   // the nflip flags for helices for correct inside/outside assignment
   // this probably belongs into cartoon renderer
-  LOGN_DEBUG("SplineGenerate: setting nflip flags for helices");
+  LOG_DEBUG("SplineGenerate: setting nflip flags for helices");
   unsigned int c=0;
   bool nflip=false;
   while(c<sublist.size()-1) {
@@ -443,7 +443,7 @@ SplineEntryList Spline::Generate(const SplineEntryList& entry_list, int nsub, ui
   }
   sublist.back().nflip=nflip;
 
-  LOGN_DEBUG("SplineGenerate: done");
+  LOG_DEBUG("SplineGenerate: done");
 
   // done
   return sublist;
diff --git a/modules/gfx/src/impl/glx_offscreen_buffer.cc b/modules/gfx/src/impl/glx_offscreen_buffer.cc
index 12489282e..1edb5773f 100644
--- a/modules/gfx/src/impl/glx_offscreen_buffer.cc
+++ b/modules/gfx/src/impl/glx_offscreen_buffer.cc
@@ -107,9 +107,9 @@ OffscreenBuffer::OffscreenBuffer(unsigned int width, unsigned int height, const
 OffscreenBuffer::~OffscreenBuffer()
 {
   if(valid_) {
-    LOGN_DEBUG("offscreen buffer: glXDestroyContext()");
+    LOG_DEBUG("offscreen buffer: glXDestroyContext()");
     glXDestroyContext(dpy_, context_);
-    LOGN_DEBUG("offscreen buffer: glXDestroyPbuffer()");
+    LOG_DEBUG("offscreen buffer: glXDestroyPbuffer()");
     glXDestroyPbuffer(dpy_, pbuffer_);
   }
 }
diff --git a/modules/gfx/src/impl/scene_fx.cc b/modules/gfx/src/impl/scene_fx.cc
index ae2778d83..f47e997ae 100644
--- a/modules/gfx/src/impl/scene_fx.cc
+++ b/modules/gfx/src/impl/scene_fx.cc
@@ -62,7 +62,7 @@ SceneFX::~SceneFX()
 void SceneFX::Setup()
 {
   if(!OST_GL_VERSION_2_0) return;
-  LOGN_DEBUG("SceneFX: setup");
+  LOG_DEBUG("SceneFX: setup");
 
   glGenTextures(1,&scene_tex_id_);
   glGenTextures(1,&depth_tex_id_);
@@ -201,7 +201,7 @@ void SceneFX::Resize(unsigned int w, unsigned int h)
 
   if(status!=GL_FRAMEBUFFER_COMPLETE) {
     use_fb_=false;
-    LOGN_VERBOSE("SceneFX: framebuffer error code " << status);
+    LOG_VERBOSE("SceneFX: framebuffer error code " << status);
   } else {
     use_fb_=true;
   }
@@ -380,7 +380,7 @@ void SceneFX::prep_shadow_map()
   GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
   
   if(status!=GL_FRAMEBUFFER_COMPLETE) {
-    LOGN_DEBUG("fbo switch for shadow mapping failed, using fallback");
+    LOG_DEBUG("fbo switch for shadow mapping failed, using fallback");
     glBindRenderbuffer(GL_RENDERBUFFER, 0);
     glBindFramebuffer(GL_FRAMEBUFFER, 0);
     smap_size=512;
@@ -397,7 +397,7 @@ void SceneFX::prep_shadow_map()
   GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
   
   if(status!=GL_FRAMEBUFFER_COMPLETE_EXT) {
-    LOGN_DEBUG("fbo switch for shadow mapping failed, using fallback");
+    LOG_DEBUG("fbo switch for shadow mapping failed, using fallback");
     glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, 0);
     glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
     smap_size=512;
diff --git a/modules/gfx/src/map_iso.cc b/modules/gfx/src/map_iso.cc
index d8d0999e2..9de115593 100644
--- a/modules/gfx/src/map_iso.cc
+++ b/modules/gfx/src/map_iso.cc
@@ -174,7 +174,7 @@ void MapIso::CustomPreRenderGL(bool flag)
   if(flag) {
     Rebuild();
   }
-  RefreshVA(va_);
+  //RefreshVA(va_);
 }
 
 namespace {
diff --git a/modules/gfx/src/map_slab.hh b/modules/gfx/src/map_slab.hh
index 7cd85a111..d08ba2da5 100644
--- a/modules/gfx/src/map_slab.hh
+++ b/modules/gfx/src/map_slab.hh
@@ -30,8 +30,8 @@
 
 #include <ost/img/map.hh>
 
-#include "glext_include.hh"
 #include "gfx_object.hh"
+#include "glext_include.hh"
 
 namespace ost { namespace gfx {
 
diff --git a/modules/gfx/src/scene.cc b/modules/gfx/src/scene.cc
index 8fc5eacfb..a5727ba71 100644
--- a/modules/gfx/src/scene.cc
+++ b/modules/gfx/src/scene.cc
@@ -314,13 +314,13 @@ void set_light_dir(Vec3 ld)
 
 void Scene::InitGL(bool full)
 {
-  LOGN_DEBUG("scene: initializing GL state");
+  LOG_DEBUG("scene: initializing GL state");
 
   if(full) {
-    LOGN_VERBOSE(glGetString(GL_RENDERER) << ", openGL version " << glGetString(GL_VERSION)); 
+    LOG_VERBOSE(glGetString(GL_RENDERER) << ", openGL version " << glGetString(GL_VERSION)); 
 
 #if OST_SHADER_SUPPORT_ENABLED
-    LOGN_DEBUG("scene: shader pre-gl");
+    LOG_DEBUG("scene: shader pre-gl");
     Shader::Instance().PreGLInit();
 #endif
   }
@@ -381,7 +381,7 @@ void Scene::InitGL(bool full)
   }
 
   if(mbufs>0 && msamples>0) {
-    LOGN_VERBOSE("Scene: enabling multisampling with: " << msamples << " samples");
+    LOG_VERBOSE("Scene: enabling multisampling with: " << msamples << " samples");
     glDisable(GL_LINE_SMOOTH);
     glDisable(GL_POINT_SMOOTH);
     glDisable(GL_POLYGON_SMOOTH);
@@ -410,10 +410,10 @@ void Scene::InitGL(bool full)
 
 #if OST_SHADER_SUPPORT_ENABLED
   if(full) {
-    LOGN_DEBUG("scene: shader setup");
+    LOG_DEBUG("scene: shader setup");
     Shader::Instance().Setup();
     SetShadingMode(def_shading_mode_);
-    LOGN_DEBUG("scene: scenefx setup");
+    LOG_DEBUG("scene: scenefx setup");
     impl::SceneFX::Instance().Setup();
   }
 #endif
@@ -448,7 +448,7 @@ void Scene::InitGL(bool full)
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
   glTexEnvf(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE, GL_REPLACE);
 
-  LOGN_DEBUG("scene: gl init done");
+  LOG_DEBUG("scene: gl init done");
   gl_init_=true;
 }
 
@@ -689,7 +689,7 @@ namespace {
         reg = boost::regex(rs);
         valid = true;
       } catch (boost::regex_error& e) {
-        LOGN_ERROR("invalid regex");
+        LOG_ERROR("invalid regex");
       }
     }
 
@@ -1282,7 +1282,7 @@ void Scene::Stereo(unsigned int m)
     if(win_ && win_->HasStereo()) {
       stereo_=1;
     } else {
-      LOGN_MESSAGE("No visual present for quad-buffered stereo");
+      LOG_INFO("No visual present for quad-buffered stereo");
       stereo_=0;
     }
   } else if(m==2) {
@@ -1376,7 +1376,7 @@ bool Scene::StartOffscreenMode(unsigned int width, unsigned int height)
   main_offscreen_buffer_ = new OffscreenBuffer(width,height,OffscreenBufferFormat(),true);
 
   if(!main_offscreen_buffer_->IsValid()) {
-    LOGN_ERROR("error during offscreen buffer creation");
+    LOG_ERROR("error during offscreen buffer creation");
     delete main_offscreen_buffer_;   
     main_offscreen_buffer_=0;
     return false;
@@ -1391,19 +1391,19 @@ bool Scene::StartOffscreenMode(unsigned int width, unsigned int height)
   String shader_name = Shader::Instance().GetCurrentName();
 #endif
 
-  LOGN_DEBUG("initializing GL");
+  LOG_DEBUG("initializing GL");
   if(gl_init_) {
     this->InitGL(false);
   } else {
     this->InitGL(true);
   }
-  LOGN_DEBUG("setting viewport");
+  LOG_DEBUG("setting viewport");
   Resize(width,height);
-  LOGN_DEBUG("updating fog settings");
+  LOG_DEBUG("updating fog settings");
   update_fog();
   glDrawBuffer(GL_FRONT);
 #if OST_SHADER_SUPPORT_ENABLED
-  LOGN_DEBUG("activating shader");
+  LOG_DEBUG("activating shader");
   Shader::Instance().Activate(shader_name);
 #endif
   return true;
@@ -1447,7 +1447,7 @@ void Scene::Export(const String& fname, unsigned int width,
       return;
     }
   }
-  LOGN_DEBUG("rendering into offscreen buffer");
+  LOG_DEBUG("rendering into offscreen buffer");
   this->RenderGL();
   // make sure drawing operations are finished
   glFlush();
@@ -1455,7 +1455,7 @@ void Scene::Export(const String& fname, unsigned int width,
 
   boost::shared_array<uchar> img_data(new uchar[width*height*4]);
       
-  LOGN_DEBUG("setting background transparency");
+  LOG_DEBUG("setting background transparency");
   if (transparent) {
     glPixelTransferf(GL_ALPHA_BIAS, 0.0);
   } else {
@@ -1463,12 +1463,12 @@ void Scene::Export(const String& fname, unsigned int width,
     glPixelTransferf(GL_ALPHA_BIAS, 1.0);
   }
   
-  LOGN_DEBUG("reading framebuffer pixels");
+  LOG_DEBUG("reading framebuffer pixels");
   glReadBuffer(GL_FRONT);
   glReadPixels(0,0,width,height,GL_RGBA,GL_UNSIGNED_BYTE,img_data.get());
   glReadBuffer(GL_BACK);
 
-  LOGN_DEBUG("calling bitmap export");
+  LOG_DEBUG("calling bitmap export");
   BitmapExport(fname,ext,width,height,img_data.get());
 
   // only switch back if it was not on to begin with
@@ -1480,7 +1480,7 @@ void Scene::Export(const String& fname, unsigned int width,
 void Scene::Export(const String& fname, bool transparent)
 {
   if(!win_ && !main_offscreen_buffer_) {
-    LOGN_ERROR("Export without dimensions either requires an interactive session \nor an active offscreen mode (scene.StartOffscreenMode(W,H))");
+    LOG_ERROR("Export without dimensions either requires an interactive session \nor an active offscreen mode (scene.StartOffscreenMode(W,H))");
     return;
   }
   int d_index=fname.rfind('.');
diff --git a/modules/gfx/src/shader.cc b/modules/gfx/src/shader.cc
index 73a7eb385..0a14cf59b 100644
--- a/modules/gfx/src/shader.cc
+++ b/modules/gfx/src/shader.cc
@@ -51,7 +51,7 @@ Shader::Shader():
   shader_program_map_()
 {
   if(!OST_GL_VERSION_2_0) {
-    LOGN_VERBOSE("OpenGL version smaller 2.0, deactivating shader functionality");
+    LOG_VERBOSE("OpenGL version smaller 2.0, deactivating shader functionality");
   }
 }
 
diff --git a/modules/gfx/src/vertex_array.cc b/modules/gfx/src/vertex_array.cc
index ccd54b63e..ce0f4b731 100644
--- a/modules/gfx/src/vertex_array.cc
+++ b/modules/gfx/src/vertex_array.cc
@@ -411,7 +411,7 @@ void IndexedVertexArray::RenderGL()
       use_buff=prep_buff();
     }
     if(!use_buff) {
-      LOGN_DUMP("buffer not available");
+      LOG_TRACE("buffer not available");
       glBindBuffer(GL_ARRAY_BUFFER,0);
       glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,0);
     } else {
diff --git a/modules/gui/src/gl_win.cc b/modules/gui/src/gl_win.cc
index 56434e4bc..ed609e1c9 100644
--- a/modules/gui/src/gl_win.cc
+++ b/modules/gui/src/gl_win.cc
@@ -53,7 +53,7 @@ gl_canvas_(NULL)
   QMainWindow* main=new QMainWindow;
   
   if(try_stereo) {
-    LOGN_VERBOSE("GLCanvas: trying stereo visuals first");
+    LOG_VERBOSE("GLCanvas: trying stereo visuals first");
     for(int format_id=3;format_id>=0;--format_id) {
       QGLFormat format=GLWin::CreateFormat(format_id);
       format.setStereo(true);
@@ -68,7 +68,7 @@ gl_canvas_(NULL)
   }
   if(!gl_canvas_) {
     if(try_stereo) {
-      LOGN_VERBOSE("GLCanvas: no stereo visual found, trying normal ones");
+      LOG_VERBOSE("GLCanvas: no stereo visual found, trying normal ones");
     }
     for(int format_id=3;format_id>=0;--format_id) {
       QGLFormat format=GLWin::CreateFormat(format_id);
@@ -83,7 +83,7 @@ gl_canvas_(NULL)
   }
 
   if(!gl_canvas_ || !gl_canvas_->isValid()) {
-    LOGN_ERROR("GLCanvas: no valid GL context found, this is pretty fatal");
+    LOG_ERROR("GLCanvas: no valid GL context found, this is pretty fatal");
     return;
   }
 
@@ -91,7 +91,7 @@ gl_canvas_(NULL)
   gfx::Scene::Instance().AttachObserver(this);
   QGLFormat format = gl_canvas_->format();
 
-  LOGN_DEBUG("GLCanvas: rbits=" << format.redBufferSize() 
+  LOG_DEBUG("GLCanvas: rbits=" << format.redBufferSize() 
                << " gbits=" << format.greenBufferSize() 
                << " bbits=" << format.blueBufferSize() 
                << " abits=" << format.alphaBufferSize() 
@@ -100,7 +100,7 @@ gl_canvas_(NULL)
                << " multisample=" << format.sampleBuffers()
                << " with samples=" << format.samples());
   if(gl_canvas_->format().stereo()) {
-    LOGN_VERBOSE("GLCanvas: using stereo visual");
+    LOG_VERBOSE("GLCanvas: using stereo visual");
   }
   main->setCentralWidget(gl_canvas_);
   connect(gl_canvas_, SIGNAL(ReleaseFocus()), this, SIGNAL(ReleaseFocus()));
diff --git a/modules/gui/src/tools/map_tool.cc b/modules/gui/src/tools/map_tool.cc
index ef2a78441..5b8872839 100644
--- a/modules/gui/src/tools/map_tool.cc
+++ b/modules/gui/src/tools/map_tool.cc
@@ -17,13 +17,14 @@
 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 //------------------------------------------------------------------------------
 
-#include <ost/gui/gosty_app.hh>
 #include <ost/platform.hh>
-#include <ost/gfx/map_iso.hh>
 #include <ost/gfx/map_slab.hh>
 #include <ost/gfx/scene.hh>
+#include <ost/gfx/map_iso.hh>
 
+#include <ost/gui/gosty_app.hh>
 #include <ost/gui/scene_selection.hh>
+
 #include "map_tool.hh"
 
 #include <QDir>
diff --git a/modules/mol/base/src/query_view_wrapper.cc b/modules/mol/base/src/query_view_wrapper.cc
index 310bc468b..651566458 100644
--- a/modules/mol/base/src/query_view_wrapper.cc
+++ b/modules/mol/base/src/query_view_wrapper.cc
@@ -43,24 +43,13 @@ QueryViewWrapper::QueryViewWrapper(const EntityView& entity_view):
     query_(),
     flags_(0){}
 
-QueryViewWrapper::QueryViewWrapper(const Query& query, 
-                                   const EntityHandle& entity_handle,
-                                   QueryFlags f):
+QueryViewWrapper::QueryViewWrapper(const Query& query, const EntityHandle& entity_handle):
     view_set_(false),
     entity_handle_(entity_handle),
     entity_view_(),
     query_(query),
     flags_(0){}
 
-QueryViewWrapper::QueryViewWrapper(const Query& query, 
-                                   const EntityView& view,
-                                   QueryFlags f):
-    view_set_(true),
-    entity_handle_(),
-    entity_view_(view),
-    query_(query),
-    flags_(0){}
-
 QueryViewWrapper::QueryViewWrapper(const Query& query, QueryFlags flags,
                                    const EntityHandle& entity_handle):
     view_set_(false),
@@ -69,6 +58,13 @@ QueryViewWrapper::QueryViewWrapper(const Query& query, QueryFlags flags,
     query_(query),
     flags_(flags){}
 
+QueryViewWrapper::QueryViewWrapper(const Query& query, const EntityView& view):
+    view_set_(true),
+    entity_handle_(),
+    entity_view_(view),
+    query_(query),
+    flags_(0){}
+
 QueryViewWrapper::QueryViewWrapper(const Query& query, QueryFlags flags,
                                    const EntityView& view):
     view_set_(true),
-- 
GitLab