diff options
author | Karl Berry <karl@freefriends.org> | 2019-08-10 16:06:35 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-08-10 16:06:35 +0000 |
commit | bbb53f06c6f48d4c675d250829032e09f4065a86 (patch) | |
tree | 0583c905a5d67f3e1447456048b2e479311e4e83 /Build/source/utils/asymptote/drawpath3.cc | |
parent | efd1dbbaa1332a9534c25024a0c295f423714851 (diff) |
asy 2.52 sources
git-svn-id: svn://tug.org/texlive/trunk@51856 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/drawpath3.cc')
-rw-r--r-- | Build/source/utils/asymptote/drawpath3.cc | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/Build/source/utils/asymptote/drawpath3.cc b/Build/source/utils/asymptote/drawpath3.cc index 22e5c918996..55752509fff 100644 --- a/Build/source/utils/asymptote/drawpath3.cc +++ b/Build/source/utils/asymptote/drawpath3.cc @@ -23,6 +23,7 @@ using namespace prc; using gl::modelView; BezierCurve drawPath3::R; +Pixel drawPixel::R; #endif bool drawPath3::write(prcfile *out, unsigned int *, double, groupsmap&) @@ -94,7 +95,7 @@ void drawPath3::render(double size2, const triple& b, const triple& B, return; RGBAColour Black(0.0,0.0,0.0,color.A); - setcolors(false,Black,Black,color,Black,1.0); + setcolors(false,Black,color,Black,1.0,0.0,0.04); if(billboard) { for(Int i=0; i < n; ++i) { @@ -111,7 +112,11 @@ void drawPath3::render(double size2, const triple& b, const triple& B, R.queue(controls,straight,size3.length()/size2,m,M); } } - R.draw(); + if(BezierCurve::vertexbuffer.size() >= (unsigned) gl::maxvertices) { + R.draw(); + BezierCurve::clear(); + gl::forceRemesh=true; + } #endif } @@ -217,19 +222,7 @@ void drawNurbsPath3::render(double, const triple&, const triple&, if(invisible || ((color.A < 1.0) ^ transparent)) return; - GLfloat Diffuse[]={0.0,0.0,0.0,(GLfloat) color.A}; - glMaterialfv(GL_FRONT,GL_DIFFUSE,Diffuse); - - static GLfloat Black[]={0.0,0.0,0.0,1.0}; - glMaterialfv(GL_FRONT,GL_AMBIENT,Black); - - GLfloat Emissive[]={(GLfloat) color.R,(GLfloat) color.G,(GLfloat) color.B, - (GLfloat) color.A}; - glMaterialfv(GL_FRONT,GL_EMISSION,Emissive); - - glMaterialfv(GL_FRONT,GL_SPECULAR,Black); - - glMaterialf(GL_FRONT,GL_SHININESS,128.0); +// TODO: implement NURBS renderer #endif } @@ -276,11 +269,15 @@ void drawPixel::render(double size2, const triple& b, const triple& B, return; RGBAColour Black(0.0,0.0,0.0,color.A); - setcolors(false,color,Black,color,Black,1.0); + setcolors(false,color,color,Black,1.0,0.0,0.04); + + R.queue(v,width); - glPointSize(1.0+width); - R.draw(v); - glPointSize(1.0); + if(Pixel::vertexbuffer.size() >= (unsigned) gl::maxvertices) { + R.draw(); + Pixel::clear(); + gl::forceRemesh=true; + } #endif } |