head 1.4; access; symbols; locks; strict; comment @# @; 1.4 date 2002.09.07.01.50.41; author curt; state Exp; branches; next 1.3; 1.3 date 2002.08.31.19.01.59; author curt; state Exp; branches; next 1.2; 1.2 date 2002.08.31.18.54.05; author curt; state Exp; branches; next 1.1; 1.1 date 2002.02.15.17.22.02; author curt; state Exp; branches; next ; desc @@ 1.4 log @Updated doxygen docs. @ text @
Main Page Class Hierarchy Compound List File List Compound Members File Members

# tr.h

    00001 /* $Id: tr.h,v 1.1 2001/06/26 15:19:39 curt Exp $ */
    00002
    00003 /*
    00004  * $Log: tr.h,v $
    00005  * Revision 1.1  2001/06/26 15:19:39  curt
    00006  * Added tr.cxx / tr.h, Brian Paul's LGPL'd tiled rendering support libs for
    00007  * rendering ultra high res "tiled" screen shots.
    00008  *
    00009  * Revision 1.5  1997/07/21  17:34:07  brianp
    00010  * added tile borders, incremented version to 1.1
    00011  *
    00012  * Revision 1.4  1997/07/21  15:47:35  brianp
    00013  * renamed all "near" and "far" variables
    00014  *
    00015  * Revision 1.3  1997/04/26  21:23:25  brianp
    00016  * added trRasterPos3f function
    00017  *
    00018  * Revision 1.2  1997/04/19  23:26:10  brianp
    00019  * many API changes
    00020  *
    00021  * Revision 1.1  1997/04/18  21:53:05  brianp
    00022  * Initial revision
    00023  *
    00024  */
    00025
    00026
    00027 /*
    00028  * Tiled Rendering library
    00029  * Version 1.1
    00030  * Copyright (C) Brian Paul
    00031  *
    00032  *
    00033  * This library allows one to render arbitrarily large images with OpenGL.
    00034  * The basic idea is to break the image into tiles which are rendered one
    00035  * at a time.  The tiles are assembled together to form the final, large
    00036  * image.  Tiles and images can be of any size.
    00037  *
    00038  * Basic usage:
    00039  *
    00040  * 1. Allocate a tile rendering context:
    00041  *       TRcontext t = trNew();
    00042  *
    00043  * 2. Specify the final image buffer and tile size:
    00044  *       GLubyte image[W][H][4]
    00045  *       trImageSize(t, W, H);
    00046  *       trImageBuffer(t, GL_RGBA, GL_UNSIGNED_BYTE, (GLubyte *) image);
    00047  *
    00048  * 3. Setup your projection:
    00049  *       trFrustum(t, left, right, bottom top, near, far);
    00050  *    or
    00051  *       trOrtho(t, left, right, bottom top, near, far);
    00052  *    or
    00053  *       trPerspective(t, fovy, aspect, near, far);
    00054  *
    00055  * 4. Render the tiles:
    00056  *       do {
    00057  *           trBeginTile(t);
    00058  *           DrawMyScene();
    00059  *       } while (trEndTile(t));
    00060  *
    00061  *    You provide the DrawMyScene() function which calls glClear() and
    00062  *    draws all your stuff.
    00063  *
    00064  * 5. The image array is now complete.  Display it, write it to a file, etc.
    00065  *
    00066  * 6. Delete the tile rendering context when finished:
    00067  *       trDelete(t);
    00068  *
    00069  */
    00070
    00071
    00072 #ifndef TR_H
    00073 #define TR_H
    00074
    00075
    00076 #include <GL/gl.h>
    00077
    00078
    00079 //#ifdef __cplusplus
    00080 //extern "C" {
    00081 //#endif
    00082
    00083
    00084 #define TR_VERSION "1.1"
    00085 #define TR_MAJOR_VERSION 1
    00086 #define TR_MINOR_VERSION 1
    00087
    00088
    00089 typedef struct _TRctx TRcontext;
    00090
    00091
    00092 typedef enum {
    00093         TR_TILE_WIDTH = 100,
    00094         TR_TILE_HEIGHT,
    00095         TR_TILE_BORDER,
    00096         TR_IMAGE_WIDTH,
    00097         TR_IMAGE_HEIGHT,
    00098         TR_ROWS,
    00099         TR_COLUMNS,
    00100         TR_CURRENT_ROW,
    00101         TR_CURRENT_COLUMN,
    00102         TR_CURRENT_TILE_WIDTH,
    00103         TR_CURRENT_TILE_HEIGHT,
    00104         TR_ROW_ORDER,
    00105         TR_TOP_TO_BOTTOM,
    00106         TR_BOTTOM_TO_TOP,
    00107         TR_LEFT,
    00108         TR_RIGHT,
    00109         TR_BOTTOM,
    00110         TR_TOP,
    00111         TR_NEAR,
    00112         TR_FAR
    00113 } TRenum;
    00114
    00115
    00116
    00117 extern TRcontext *trNew(void);
    00118
    00119 extern void trDelete(TRcontext *tr);
    00120
    00121
    00122 extern void trTileSize(TRcontext *tr, GLint width, GLint height, GLint border);
    00123
    00124 extern void trTileBuffer(TRcontext *tr, GLenum format, GLenum type,
    00125                                                  GLvoid *image);
    00126
    00127
    00128 extern void trImageSize(TRcontext *tr, GLint width, GLint height);
    00129
    00130 extern void trImageBuffer(TRcontext *tr, GLenum format, GLenum type,
    00131                                                   GLvoid *image);
    00132
    00133
    00134 extern void trRowOrder(TRcontext *tr, TRenum order);
    00135
    00136
    00137 extern GLint trGet(TRcontext *tr, TRenum param);
    00138 extern GLdouble trGetD(TRcontext *tr, TRenum param);
    00139
    00140
    00141 extern void trOrtho(TRcontext *tr,
    00142                                         GLdouble left, GLdouble right,
    00143                                         GLdouble bottom, GLdouble top,
    00144                                         GLdouble zNear, GLdouble zFar);
    00145
    00146 extern void trFrustum(TRcontext *tr,
    00147                                           GLdouble left, GLdouble right,
    00148                                           GLdouble bottom, GLdouble top,
    00149                                           GLdouble zNear, GLdouble zFar);
    00150
    00151 extern void trPerspective(TRcontext *tr,
    00152                                                   GLdouble fovy, GLdouble aspect,
    00153                                                   GLdouble zNear, GLdouble zFar );
    00154
    00155
    00156 extern void trBeginTile(TRcontext *tr);
    00157
    00158 extern int trEndTile(TRcontext *tr);
    00159
    00160
    00161 extern void trRasterPos3f(TRcontext *tr, GLfloat x, GLfloat y, GLfloat z);
    00162
    00163
    00164
    00165 //#ifdef __cplusplus
    00166 //}
    00167 //#endif
    00168
    00169
    00170 #endif

@ 1.3 log @Oops, try again. @ text @d179 1 a179 1