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

fix tex output in gl2ps for large scenes
parent 430052e9
No related branches found
No related tags found
No related merge requests found
/* $Id: gl2ps.cpp,v 1.92 2004-12-21 03:07:00 geuzaine Exp $ */ /* $Id: gl2ps.cpp,v 1.93 2004-12-29 16:34:38 geuzaine Exp $ */
/* /*
* GL2PS, an OpenGL to PostScript Printing Library * GL2PS, an OpenGL to PostScript Printing Library
* Copyright (C) 1999-2004 Christophe Geuzaine <geuz@geuz.org> * Copyright (C) 1999-2004 Christophe Geuzaine <geuz@geuz.org>
...@@ -4366,18 +4366,15 @@ static GLint gl2psPrintPrimitives(void) ...@@ -4366,18 +4366,15 @@ static GLint gl2psPrintPrimitives(void)
used = glRenderMode(GL_RENDER); used = glRenderMode(GL_RENDER);
if(gl2ps->format != GL2PS_TEX){
/* only report the overflow if we actually parse the buffer! */
if(used < 0){ if(used < 0){
gl2psMsg(GL2PS_INFO, "OpenGL feedback buffer overflow"); gl2psMsg(GL2PS_INFO, "OpenGL feedback buffer overflow");
return GL2PS_OVERFLOW; return GL2PS_OVERFLOW;
} }
if(used > 0)
if(used > 0){
if(gl2ps->format == GL2PS_PS ||
gl2ps->format == GL2PS_EPS ||
gl2ps->format == GL2PS_PDF){
gl2psParseFeedbackBuffer(used); gl2psParseFeedbackBuffer(used);
} }
}
if(!gl2psListNbr(gl2ps->primitives)){ if(!gl2psListNbr(gl2ps->primitives)){
/* empty feedback buffer and/or nothing else to print */ /* empty feedback buffer and/or nothing else to print */
...@@ -4481,9 +4478,10 @@ GL2PSDLL_API GLint gl2psBeginPage(const char *title, const char *producer, ...@@ -4481,9 +4478,10 @@ GL2PSDLL_API GLint gl2psBeginPage(const char *title, const char *producer,
} }
} }
if(!viewport[2] || !viewport[3]){ if(!gl2ps->viewport[2] || !gl2ps->viewport[3]){
gl2psMsg(GL2PS_ERROR, "Incorrect viewport (x=%d, y=%d, width=%d, height=%d)", gl2psMsg(GL2PS_ERROR, "Incorrect viewport (x=%d, y=%d, width=%d, height=%d)",
viewport[0], viewport[1], viewport[2], viewport[3]); gl2ps->viewport[0], gl2ps->viewport[1],
gl2ps->viewport[2], gl2ps->viewport[3]);
gl2psFree(gl2ps); gl2psFree(gl2ps);
gl2ps = NULL; gl2ps = NULL;
return GL2PS_ERROR; return GL2PS_ERROR;
......
/* $Id: gl2ps.h,v 1.55 2004-12-21 03:07:00 geuzaine Exp $ */ /* $Id: gl2ps.h,v 1.56 2004-12-29 16:34:38 geuzaine Exp $ */
/* /*
* GL2PS, an OpenGL to PostScript Printing Library * GL2PS, an OpenGL to PostScript Printing Library
* Copyright (C) 1999-2004 Christophe Geuzaine <geuz@geuz.org> * Copyright (C) 1999-2004 Christophe Geuzaine <geuz@geuz.org>
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
#define GL2PS_MAJOR_VERSION 1 #define GL2PS_MAJOR_VERSION 1
#define GL2PS_MINOR_VERSION 2 #define GL2PS_MINOR_VERSION 2
#define GL2PS_PATCH_VERSION 3 #define GL2PS_PATCH_VERSION 4
#define GL2PS_VERSION (GL2PS_MAJOR_VERSION + \ #define GL2PS_VERSION (GL2PS_MAJOR_VERSION + \
0.01 * GL2PS_MINOR_VERSION + \ 0.01 * GL2PS_MINOR_VERSION + \
......
$Id: VERSIONS,v 1.288 2004-12-29 01:26:01 geuzaine Exp $ $Id: VERSIONS,v 1.289 2004-12-29 16:34:38 geuzaine Exp $
New since 1.57: new File->Rename menu; new colormaps+improved colormap New since 1.57: new File->Rename menu; new colormaps+improved colormap
handling; new color+min/max options in views; new GetValue() function handling; new color+min/max options in views; new GetValue() function
to ask for values interactively in scripts; generalized For/EndFor to ask for values interactively in scripts; generalized For/EndFor
loops in parser; new plugins (Annotate, Remove, Probe); new text loops in parser; new plugins (Annotate, Remove, Probe); new text
attributes in views; renamed some shortcuts; various other small attributes in views; renamed some shortcuts; fixed TeX output for
enhancements and bug fixes. large scenes; various other small enhancements and bug fixes.
New in 1.57: generalized displacement maps to display arbitrary view New in 1.57: generalized displacement maps to display arbitrary view
types; the arrows representing a vector field can now also be colored types; the arrows representing a vector field can now also be colored
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment