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