From 4ebb50383bdbbd4d610b0f0c22bb765e161479a2 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Thu, 3 Apr 2014 14:59:02 +0000 Subject: [PATCH] don't use PixelBuffer.fill with vector/text gl2ps output -- it redraws the scene twice! --- Common/CreateFile.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Common/CreateFile.cpp b/Common/CreateFile.cpp index a06efe00bd..42853e6de6 100644 --- a/Common/CreateFile.cpp +++ b/Common/CreateFile.cpp @@ -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(); } -- GitLab