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

*** empty log message ***

parent 2310d2f3
No related branches found
No related tags found
No related merge requests found
// $Id: CreateFile.cpp,v 1.77 2006-05-17 01:19:05 geuzaine Exp $ // $Id: CreateFile.cpp,v 1.78 2006-05-17 03:27:06 geuzaine Exp $
// //
// Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
// //
...@@ -139,7 +139,7 @@ void CreateOutputFile(char *name, int format) ...@@ -139,7 +139,7 @@ void CreateOutputFile(char *name, int format)
CTX.print.gl_fonts = 0; CTX.print.gl_fonts = 0;
PixelBuffer buffer(width, height, GL_RGB, GL_UNSIGNED_BYTE); PixelBuffer buffer(width, height, GL_RGB, GL_UNSIGNED_BYTE);
buffer.Fill(); buffer.Fill(CTX.batch);
CTX.print.gl_fonts = 1; CTX.print.gl_fonts = 1;
if(format == FORMAT_PPM){ if(format == FORMAT_PPM){
...@@ -209,7 +209,7 @@ void CreateOutputFile(char *name, int format) ...@@ -209,7 +209,7 @@ void CreateOutputFile(char *name, int format)
if(CTX.print.eps_quality == 0){ if(CTX.print.eps_quality == 0){
if(format == FORMAT_EPSTEX || format == FORMAT_PDFTEX) if(format == FORMAT_EPSTEX || format == FORMAT_PDFTEX)
CTX.print.gl_fonts = 0; CTX.print.gl_fonts = 0;
buffer.Fill(); buffer.Fill(CTX.batch);
CTX.print.gl_fonts = 1; CTX.print.gl_fonts = 1;
} }
...@@ -252,7 +252,7 @@ void CreateOutputFile(char *name, int format) ...@@ -252,7 +252,7 @@ void CreateOutputFile(char *name, int format)
} }
else{ else{
CTX.print.gl_fonts = 0; CTX.print.gl_fonts = 0;
buffer.Fill(); buffer.Fill(CTX.batch);
CTX.print.gl_fonts = 1; CTX.print.gl_fonts = 1;
} }
res = gl2psEndPage(); res = gl2psEndPage();
...@@ -276,7 +276,7 @@ void CreateOutputFile(char *name, int format) ...@@ -276,7 +276,7 @@ void CreateOutputFile(char *name, int format)
0, 0, 0, 1000, fp, name); 0, 0, 0, 1000, fp, name);
CTX.print.gl_fonts = 0; CTX.print.gl_fonts = 0;
PixelBuffer buffer(width, height, GL_RGB, GL_UNSIGNED_BYTE); PixelBuffer buffer(width, height, GL_RGB, GL_UNSIGNED_BYTE);
buffer.Fill(); buffer.Fill(CTX.batch);
CTX.print.gl_fonts = 1; CTX.print.gl_fonts = 1;
res = gl2psEndPage(); res = gl2psEndPage();
Msg(INFO, "Wrote TEX file '%s'", name); Msg(INFO, "Wrote TEX file '%s'", name);
......
...@@ -32,9 +32,6 @@ ...@@ -32,9 +32,6 @@
#include "Gmsh.h" #include "Gmsh.h"
#include "GmshUI.h" #include "GmshUI.h"
#include "Draw.h" #include "Draw.h"
#include "Context.h"
extern Context_T CTX;
#if defined(HAVE_OSMESA) #if defined(HAVE_OSMESA)
#include <GL/osmesa.h> #include <GL/osmesa.h>
...@@ -85,9 +82,9 @@ class PixelBuffer{ ...@@ -85,9 +82,9 @@ class PixelBuffer{
GLenum GetFormat(){ return _format; } GLenum GetFormat(){ return _format; }
GLenum GetType(){ return _type; } GLenum GetType(){ return _type; }
void *GetPixels(){ return _pixels; } void *GetPixels(){ return _pixels; }
void Fill() void Fill(int offscreen)
{ {
if(!CTX.batch){ if(!offscreen){
SetOpenglContext(); SetOpenglContext();
ClearOpengl(); ClearOpengl();
Draw3d(); Draw3d();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment