70#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
72# pragma warning(disable:4115)
73# pragma warning(disable:4127)
74# pragma warning(disable:4996)
76# if !defined(NOMINMAX)
82# if defined(GL2PSDLL_EXPORTS)
83# define GL2PSDLL_API __declspec(dllexport)
85# define GL2PSDLL_API __declspec(dllimport)
94#if defined(__APPLE__) || defined(HAVE_OPENGL_GL_H)
95# include <OpenGL/gl.h>
103#if defined(HAVE_ZLIB) || defined(HAVE_LIBZ)
104# define GL2PS_HAVE_ZLIB
105# if defined(HAVE_LIBPNG) || defined(HAVE_PNG)
106# define GL2PS_HAVE_LIBPNG
110#if defined(HAVE_NO_VSNPRINTF)
111# define GL2PS_HAVE_NO_VSNPRINTF
116#define GL2PS_MAJOR_VERSION 1
117#define GL2PS_MINOR_VERSION 4
118#define GL2PS_PATCH_VERSION 2
119#define GL2PS_EXTRA_VERSION ""
121#define GL2PS_VERSION (GL2PS_MAJOR_VERSION + \
122 0.01 * GL2PS_MINOR_VERSION + \
123 0.0001 * GL2PS_PATCH_VERSION)
125#define GL2PS_COPYRIGHT "(C) 1999-2020 C. Geuzaine"
138#define GL2PS_NO_SORT 1
139#define GL2PS_SIMPLE_SORT 2
140#define GL2PS_BSP_SORT 3
144#define GL2PS_SUCCESS 0
146#define GL2PS_WARNING 2
148#define GL2PS_NO_FEEDBACK 4
149#define GL2PS_OVERFLOW 5
150#define GL2PS_UNINITIALIZED 6
155#define GL2PS_DRAW_BACKGROUND (1<<0)
156#define GL2PS_SIMPLE_LINE_OFFSET (1<<1)
157#define GL2PS_SILENT (1<<2)
158#define GL2PS_BEST_ROOT (1<<3)
159#define GL2PS_OCCLUSION_CULL (1<<4)
160#define GL2PS_NO_TEXT (1<<5)
161#define GL2PS_LANDSCAPE (1<<6)
162#define GL2PS_NO_PS3_SHADING (1<<7)
163#define GL2PS_NO_PIXMAP (1<<8)
164#define GL2PS_USE_CURRENT_VIEWPORT (1<<9)
165#define GL2PS_COMPRESS (1<<10)
166#define GL2PS_NO_BLENDING (1<<11)
167#define GL2PS_TIGHT_BOUNDING_BOX (1<<12)
168#define GL2PS_NO_OPENGL_CONTEXT (1<<13)
169#define GL2PS_NO_TEX_FONTSIZE (1<<14)
173#define GL2PS_POLYGON_OFFSET_FILL 1
174#define GL2PS_POLYGON_BOUNDARY 2
175#define GL2PS_LINE_STIPPLE 3
180#define GL2PS_LINE_CAP_BUTT 0
181#define GL2PS_LINE_CAP_ROUND 1
182#define GL2PS_LINE_CAP_SQUARE 2
184#define GL2PS_LINE_JOIN_MITER 0
185#define GL2PS_LINE_JOIN_ROUND 1
186#define GL2PS_LINE_JOIN_BEVEL 2
194#define GL2PS_TEXT_C 1
195#define GL2PS_TEXT_CL 2
196#define GL2PS_TEXT_CR 3
197#define GL2PS_TEXT_B 4
198#define GL2PS_TEXT_BL 5
199#define GL2PS_TEXT_BR 6
200#define GL2PS_TEXT_T 7
201#define GL2PS_TEXT_TL 8
202#define GL2PS_TEXT_TR 9
213#define GL2PS_NO_TYPE -1
217#define GL2PS_QUADRANGLE 4
218#define GL2PS_TRIANGLE 5
219#define GL2PS_PIXMAP 6
220#define GL2PS_IMAGEMAP 7
221#define GL2PS_IMAGEMAP_WRITTEN 8
222#define GL2PS_IMAGEMAP_VISIBLE 9
223#define GL2PS_SPECIAL 10
225#if defined(__cplusplus)
230 GLint viewport[4], GLint format, GLint sort,
231 GLint options, GLint colormode,
233 GLint nr, GLint ng, GLint nb, GLint buffersize,
234 FILE *stream,
const char *filename);
243 GLshort fontsize, GLint align, GLfloat
angle);
245 GLshort fontsize, GLint align, GLfloat
angle,
248 GLshort fontsize, GLint align, GLfloat
angle,
249 GL2PSrgba color, GLfloat blx, GLfloat bly);
253 GLint xorig, GLint yorig,
254 GLenum format, GLenum type,
const void *pixels);
268 GLfloat ofactor, GLfloat ounits,
269 GLushort pattern, GLint factor,
270 GLfloat width, GLint linecap,
271 GLint linejoin,
char boundary);
276 const unsigned char *imagemap);
282#if defined(__cplusplus)
static const G4double angle[DIMMOTT]
GL2PSDLL_API GLint gl2psLineJoin(GLint value)
GL2PSDLL_API GLint gl2psEndViewport(void)
GL2PSDLL_API const char * gl2psGetFormatDescription(GLint format)
GL2PSDLL_API GLint gl2psDrawPixels(GLsizei width, GLsizei height, GLint xorig, GLint yorig, GLenum format, GLenum type, const void *pixels)
GL2PSDLL_API GLint gl2psLineCap(GLint value)
GL2PSDLL_API const char * gl2psGetFileExtension(GLint format)
GL2PSDLL_API GLint gl2psPointSize(GLfloat value)
GL2PSDLL_API GLint gl2psSpecial(GLint format, const char *str)
GL2PSDLL_API GLint gl2psBeginPage(const char *title, const char *producer, GLint viewport[4], GLint format, GLint sort, GLint options, GLint colormode, GLint colorsize, GL2PSrgba *colormap, GLint nr, GLint ng, GLint nb, GLint buffersize, FILE *stream, const char *filename)
GL2PSDLL_API GLint gl2psTextOptColor(const char *str, const char *fontname, GLshort fontsize, GLint align, GLfloat angle, GL2PSrgba color)
GL2PSDLL_API GLint gl2psBlendFunc(GLenum sfactor, GLenum dfactor)
GL2PSDLL_API GLint gl2psDrawImageMap(GLsizei width, GLsizei height, const GLfloat position[3], const unsigned char *imagemap)
GL2PSDLL_API GLint gl2psSetOptions(GLint options)
GL2PSDLL_API GLint gl2psDisable(GLint mode)
GL2PSDLL_API GLint gl2psBeginViewport(GLint viewport[4])
GL2PSDLL_API GLint gl2psGetFileFormat()
GL2PSDLL_API void gl2psAddPolyPrimitive(GLshort type, GLshort numverts, GL2PSvertex *verts, GLint offset, GLfloat ofactor, GLfloat ounits, GLushort pattern, GLint factor, GLfloat width, GLint linecap, GLint linejoin, char boundary)
GL2PSDLL_API GLint gl2psEndPage(void)
GL2PSDLL_API GLint gl2psSorting(GLint mode)
GL2PSDLL_API GLint gl2psTextOpt(const char *str, const char *fontname, GLshort fontsize, GLint align, GLfloat angle)
GL2PSDLL_API GLint gl2psText(const char *str, const char *fontname, GLshort fontsize)
GL2PSDLL_API GLint gl2psSpecialColor(GLint format, const char *str, GL2PSrgba rgba)
GL2PSDLL_API GLint gl2psEnable(GLint mode)
GL2PSDLL_API GLint gl2psSetTexScaling(GLfloat scaling)
GL2PSDLL_API GLint gl2psForceRasterPos(GL2PSvertex *vert)
GL2PSDLL_API GLint gl2psLineWidth(GLfloat value)
GL2PSDLL_API GLint gl2psGetOptions(GLint *options)
GL2PSDLL_API GLint gl2psTextOptColorBL(const char *str, const char *fontname, GLshort fontsize, GLint align, GLfloat angle, GL2PSrgba color, GLfloat blx, GLfloat bly)