00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083 #ifndef TR_H
00084 #define TR_H
00085
00086 #include <simgear/compiler.h>
00087
00088 #include SG_GL_H
00089
00090
00091
00092
00093
00094
00095
00096 #define TR_VERSION "1.1"
00097 #define TR_MAJOR_VERSION 1
00098 #define TR_MINOR_VERSION 1
00099
00100
00101 typedef struct _TRctx TRcontext;
00102
00103
00104 typedef enum {
00105 TR_TILE_WIDTH = 100,
00106 TR_TILE_HEIGHT,
00107 TR_TILE_BORDER,
00108 TR_IMAGE_WIDTH,
00109 TR_IMAGE_HEIGHT,
00110 TR_ROWS,
00111 TR_COLUMNS,
00112 TR_CURRENT_ROW,
00113 TR_CURRENT_COLUMN,
00114 TR_CURRENT_TILE_WIDTH,
00115 TR_CURRENT_TILE_HEIGHT,
00116 TR_ROW_ORDER,
00117 TR_TOP_TO_BOTTOM,
00118 TR_BOTTOM_TO_TOP,
00119 TR_LEFT,
00120 TR_RIGHT,
00121 TR_BOTTOM,
00122 TR_TOP,
00123 TR_NEAR,
00124 TR_FAR
00125 } TRenum;
00126
00127
00128
00129 extern TRcontext *trNew(void);
00130
00131 extern void trDelete(TRcontext *tr);
00132
00133
00134 extern void trTileSize(TRcontext *tr, GLint width, GLint height, GLint border);
00135
00136 extern void trTileBuffer(TRcontext *tr, GLenum format, GLenum type,
00137 GLvoid *image);
00138
00139
00140 extern void trImageSize(TRcontext *tr, GLint width, GLint height);
00141
00142 extern void trImageBuffer(TRcontext *tr, GLenum format, GLenum type,
00143 GLvoid *image);
00144
00145
00146 extern void trRowOrder(TRcontext *tr, TRenum order);
00147
00148
00149 extern GLint trGet(TRcontext *tr, TRenum param);
00150 extern GLdouble trGetD(TRcontext *tr, TRenum param);
00151
00152
00153 extern void trOrtho(TRcontext *tr,
00154 GLdouble left, GLdouble right,
00155 GLdouble bottom, GLdouble top,
00156 GLdouble zNear, GLdouble zFar);
00157
00158 extern void trFrustum(TRcontext *tr,
00159 GLdouble left, GLdouble right,
00160 GLdouble bottom, GLdouble top,
00161 GLdouble zNear, GLdouble zFar);
00162
00163 extern void trPerspective(TRcontext *tr,
00164 GLdouble fovy, GLdouble aspect,
00165 GLdouble zNear, GLdouble zFar );
00166
00167
00168 extern void trBeginTile(TRcontext *tr);
00169
00170 extern int trEndTile(TRcontext *tr);
00171
00172
00173 extern void trRasterPos3f(TRcontext *tr, GLfloat x, GLfloat y, GLfloat z);
00174
00175
00176
00177
00178
00179
00180
00181
00182 #endif