Skip to content

Commit

Permalink
Revert "Fix export bug."
Browse files Browse the repository at this point in the history
This reverts commit 1566850.
  • Loading branch information
johncbowman committed Apr 13, 2020
1 parent decb4d5 commit 7f9480e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 19 deletions.
6 changes: 2 additions & 4 deletions drawpath3.cc
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ void drawPath3::render(double size2, const triple& b, const triple& B,
setMaterial(material1Data,drawMaterial1);

bool offscreen;
if(gl::exporting)
offscreen=false;
else if(billboard) {
if(billboard) {
drawElement::centerIndex=centerIndex;
BB.init(center);
offscreen=bbox2(Min,Max,BB).offscreen();
Expand Down Expand Up @@ -265,7 +263,7 @@ void drawPixel::render(double size2, const triple& b, const triple& B,

setMaterial(material0Data,drawMaterial0);

if(!gl::exporting && bbox2(Min,Max).offscreen()) { // Fully offscreen
if(bbox2(Min,Max).offscreen()) { // Fully offscreen
R.data.clear();
return;
}
Expand Down
12 changes: 4 additions & 8 deletions drawsurface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -262,15 +262,13 @@ void drawBezierPatch::render(double size2, const triple& b, const triple& B,
}

bool offscreen;
if(gl::exporting)
offscreen=false;
else if(billboard) {
if(billboard) {
drawElement::centerIndex=centerIndex;
BB.init(center);
offscreen=bbox2(Min,Max,BB).offscreen();
} else
offscreen=bbox2(Min,Max).offscreen();

if(offscreen) { // Fully offscreen
S.Onscreen=false;
S.data.clear();
Expand Down Expand Up @@ -505,9 +503,7 @@ void drawBezierTriangle::render(double size2, const triple& b, const triple& B,
}

bool offscreen;
if(gl::exporting)
offscreen=false;
else if(billboard) {
if(billboard) {
drawElement::centerIndex=centerIndex;
BB.init(center);
offscreen=bbox2(Min,Max,BB).offscreen();
Expand Down Expand Up @@ -974,7 +970,7 @@ void drawTriangles::render(double size2, const triple& b,

transparent=diffuse.A < 1.0;

if(!gl::exporting && bbox2(Min,Max).offscreen()) { // Fully offscreen
if(bbox2(Min,Max).offscreen()) { // Fully offscreen
R.Onscreen=false;
R.data.clear();
return;
Expand Down
7 changes: 1 addition & 6 deletions glrender.cc
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ namespace gl {
bool outlinemode=false;
bool glthread=false;
bool initialize=true;
bool exporting=false;

using camp::picture;
using camp::drawRawImage;
Expand Down Expand Up @@ -561,17 +560,13 @@ void Export()
(orthographic ? trOrtho : trFrustum)(tr,xmin,xmax,ymin,ymax,-zmax,-zmin);

size_t count=0;
exporting=true;
do {
trBeginTile(tr);
drawscene(fullWidth,fullHeight);
++count;
} while (trEndTile(tr));
exporting=false;

if(settings::verbose > 1)
cout << count << " tile" << (count != 1 ? "s" : "") << " drawn"
<< endl;
cout << count << " tile" << (count != 1 ? "s" : "") << " drawn" << endl;
trDelete(tr);

picture pic;
Expand Down
1 change: 0 additions & 1 deletion glrender.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ namespace gl {

extern bool outlinemode;
extern bool wireframeMode;
extern bool exporting;

extern bool orthographic;
extern double xmin,xmax;
Expand Down

0 comments on commit 7f9480e

Please sign in to comment.