diff options
author | Karl Berry <karl@freefriends.org> | 2010-06-14 23:14:16 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-06-14 23:14:16 +0000 |
commit | c2175edc7aa44ca0b526f008d473d6f8a8ac4933 (patch) | |
tree | d6c491676b413ad1922481f8c3fc7b64c3afc0a5 /Build/source/utils/asymptote/glrender.cc | |
parent | 5d08e9ff4fe5fc836d237ea08e82c82b27d558a2 (diff) |
asy 1.98
git-svn-id: svn://tug.org/texlive/trunk@18982 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/glrender.cc')
-rw-r--r-- | Build/source/utils/asymptote/glrender.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Build/source/utils/asymptote/glrender.cc b/Build/source/utils/asymptote/glrender.cc index ce7554e39f5..c56a8b82219 100644 --- a/Build/source/utils/asymptote/glrender.cc +++ b/Build/source/utils/asymptote/glrender.cc @@ -34,6 +34,10 @@ #include <GL/freeglut_ext.h> #endif +namespace camp { +billboard BB; +} + namespace gl { bool glthread=false; @@ -699,11 +703,11 @@ void zoom(int x, int y) if(zoomFactor > 0.0) { double zoomStep=getSetting<double>("zoomstep"); const double limit=log(0.1*DBL_MAX)/log(zoomFactor); - lastzoom=Zoom; double s=zoomStep*(y0-y); if(fabs(s) < limit) { Zoom *= pow(zoomFactor,s); capzoom(); + lastzoom=Zoom; y0=y; setProjection(); glutPostRedisplay(); @@ -716,13 +720,12 @@ void mousewheel(int wheel, int direction, int x, int y) { double zoomFactor=getSetting<double>("zoomfactor"); if(zoomFactor > 0.0) { - lastzoom=Zoom; if(direction > 0) Zoom *= zoomFactor; else Zoom /= zoomFactor; - capzoom(); + lastzoom=Zoom; setProjection(); glutPostRedisplay(); } @@ -1482,8 +1485,8 @@ void glrender(const string& prefix, const picture *pic, const string& format, gluNurbsProperty(nurb,GLU_PARAMETRIC_TOLERANCE,1.0); gluNurbsProperty(nurb,GLU_CULLING,GLU_TRUE); - // The callback tesselation algorithm avoids artifacts at degenerate control - // points. + // The callback tessellation algorithm avoids artifacts at degenerate + // control points. gluNurbsProperty(nurb,GLU_NURBS_MODE,GLU_NURBS_TESSELLATOR); gluNurbsCallback(nurb,GLU_NURBS_BEGIN,(_GLUfuncptr) glBegin); gluNurbsCallback(nurb,GLU_NURBS_VERTEX,(_GLUfuncptr) glVertex3fv); |