Skip to content
Snippets Groups Projects
Commit 4ebb5038 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

don't use PixelBuffer.fill with vector/text gl2ps output -- it redraws the scene twice!

parent 81b6dee0
No related branches found
No related tags found
No related merge requests found
...@@ -483,7 +483,7 @@ void CreateOutputFile(const std::string &fileName, int format, ...@@ -483,7 +483,7 @@ void CreateOutputFile(const std::string &fileName, int format,
glLoadMatrixd(modelview); glLoadMatrixd(modelview);
} }
else{ else{
buffer.fill(CTX::instance()->batch); drawContext::global()->drawCurrentOpenglWindow(true);
} }
res = gl2psEndPage(); res = gl2psEndPage();
} }
...@@ -513,10 +513,9 @@ void CreateOutputFile(const std::string &fileName, int format, ...@@ -513,10 +513,9 @@ void CreateOutputFile(const std::string &fileName, int format,
gl2psBeginPage(base.c_str(), "Gmsh", viewport, gl2psBeginPage(base.c_str(), "Gmsh", viewport,
GL2PS_TEX, GL2PS_NO_SORT, GL2PS_NONE, GL_RGBA, 0, NULL, GL2PS_TEX, GL2PS_NO_SORT, GL2PS_NONE, GL_RGBA, 0, NULL,
0, 0, 0, buffsize, fp, base.c_str()); 0, 0, 0, buffsize, fp, base.c_str());
PixelBuffer buffer(width, height, GL_RGB, GL_UNSIGNED_BYTE);
int oldtext = CTX::instance()->print.text; int oldtext = CTX::instance()->print.text;
CTX::instance()->print.text = 1; CTX::instance()->print.text = 1;
buffer.fill(CTX::instance()->batch); drawContext::global()->drawCurrentOpenglWindow(true);
CTX::instance()->print.text = oldtext; CTX::instance()->print.text = oldtext;
res = gl2psEndPage(); res = gl2psEndPage();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment