oglps.h File Reference

High-quality OpenGL-to-Postscript rendering. More...

#include <sg/sg_base.h>

Include dependency graph for oglps.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void Oglps_begin (void)
 Setup the feedback buffer for the OpenGL library to render into.
void Oglps_end (int outLine, int inColor, int doCulling)
 Feed triangles from the OpenGL library into our buffer and output to file.
void Oglps_gen (char *filename, int inColor, int width, int height)
 Quick and dirty postscript generator (low-resolution only).


Detailed Description

High-quality OpenGL-to-Postscript rendering.

Author:
Michael Holst
Note:
None
Version:
Id
oglps.h,v 1.12 2008/05/19 20:11:25 fetk Exp

Attention:
 *
 * SG = < Socket Graphics >
 * Copyright (C) 1994--2008 Michael Holst
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 * 
 *  

Function Documentation

void Oglps_begin ( void   ) 

Setup the feedback buffer for the OpenGL library to render into.

Author:
Michael Holst
Note:
We malloc the float, triangle, and edge buffer areas, set glRenderMode to GL_FEEDBACK, and finish by opening the output postscript file.
The input parameters are interpretted as:
filename ==> name of eventual output PostScript file
Returns:
None

void Oglps_end ( int  outLine,
int  inColor,
int  doCulling 
)

Feed triangles from the OpenGL library into our buffer and output to file.

Author:
Michael Holst
Note:
We flush the OpenGL rendering buffer, grab the triangles and edges from feedback buffer, construct a proper ordering for the painter's algorithm, and finally write the postscript output.
Returns:
None
Parameters:
outLine 0=use filled triangles
1=use filled triangles and then outline them
inColor 0=grayscale
1=color
doCulling 0=don't cull (render everything)
1=cull (remove backface triangles before rendering)

void Oglps_gen ( char *  filename,
int  inColor,
int  width,
int  height 
)

Quick and dirty postscript generator (low-resolution only).

Author:
Michael Holst
Note:
This generator is a modified example from Mark Kilgard's book.
Returns:
None
Parameters:
filename name of file containing PostScript output
inColor 0=grayscale, 1=color
width width of input image in pixels
height height of input image in pixels


Generated on Mon Aug 9 11:14:54 2010 for SG by  doxygen 1.5.6