diff --git a/Fltk/extraDialogs.cpp b/Fltk/extraDialogs.cpp index 9f51e95aa25fab8c0a1bebccb7793fe57fbedf5f..5570b5496f1b1c0dbbfa8e10edcca1bbbaca85c6 100644 --- a/Fltk/extraDialogs.cpp +++ b/Fltk/extraDialogs.cpp @@ -165,8 +165,8 @@ int meshSizeEditor() if(CTX::instance()->nonModalWindows) editor->window->set_non_modal(); editor->sa = new Release_Slider(0, 0, 200, 20); editor->sa->type(FL_HOR_NICE_SLIDER); - editor->sa->minimum(0.05); - editor->sa->maximum(5); + editor->sa->minimum(0.01); + editor->sa->maximum(2.5); editor->sa->callback(mesh_size_factor); editor->window->border(0); editor->window->end(); diff --git a/Fltk/openglWindow.cpp b/Fltk/openglWindow.cpp index 20abdac759b6daf5c6387d36010571ddc16c2da4..beeccda9736c2e62d38ac4e27ac2b0262f5f45b9 100644 --- a/Fltk/openglWindow.cpp +++ b/Fltk/openglWindow.cpp @@ -3,7 +3,7 @@ // See the LICENSE.txt file for license information. Please report all // bugs and problems to <gmsh@geuz.org>. -#include "stdio.h" +#include <stdio.h> #include "openglWindow.h" #include "graphicWindow.h" #include "manipWindow.h" @@ -15,10 +15,7 @@ #include "MElement.h" #include "Numeric.h" #include "FlGui.h" -#if defined(__APPLE__) -#include <OpenGL/glu.h> -#else -#include <GL/glu.h> +#include "drawContext.h" #endif #include "Context.h" @@ -180,7 +177,7 @@ void openglWindow::draw() glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); - _ctx->draw3d(); + _ctx->draw3d(); glColor4ubv((GLubyte *) & CTX::instance()->color.fg); glPointSize((float)CTX::instance()->geom.pointSize); glBegin(GL_POINTS); @@ -434,7 +431,7 @@ int openglWindow::handle(int event) // find line in real space corresponding to current cursor position double p[3], d[3]; _ctx->unproject(_curr.win[0], _curr.win[1], p, d); - // fin closest point to the center of graity + // find closest point to the center of gravity double r[3] = {CTX::instance()->cg[0] - p[0], CTX::instance()->cg[1] - p[1], CTX::instance()->cg[2] - p[2]}, t; prosca(r, d, &t); diff --git a/Graphics/drawContext.cpp b/Graphics/drawContext.cpp index 0fa39d8ec7312c1711a0a0af8745e6143e3f6f14..034e08bdf8684e08387ad47d72ce1f297d8ba737 100644 --- a/Graphics/drawContext.cpp +++ b/Graphics/drawContext.cpp @@ -260,6 +260,12 @@ void drawContext::draw3d() #if defined(HAVE_FLTK) && defined(__APPLE__) && defined(HAVE_64BIT_SIZE_T) #if (FL_MAJOR_VERSION == 1) && (FL_MINOR_VERSION == 3) int numStrings = GModel::current()->getNumVertices(); + if(CTX::instance()->mesh.pointsNum) + numStrings = std::max(numStrings, GModel::current()->getNumMeshVertices()); + if(CTX::instance()->mesh.linesNum || CTX::instance()->mesh.surfacesNum || + CTX::instance()->mesh.volumesNum) + numStrings = std::max(numStrings, GModel::current()->getNumMeshElements()); + numStrings *= 2; if(gl_texture_pile_height() < numStrings) gl_texture_pile_height(numStrings); #endif