📄 glwin.h
字号:
GLenum (*f)( glWindow w, void *user_data, int pos_x, int pos_y, GLenum button_shift_mask ) );/* Set function to be called after releasing a mouse button.For the meaning ofthe parameters, see \xref{glwSetMouseDownFunc}. %-----------------------------------------------------------------*//*\func{glwSetMouseMoveFunc}*/void glwSetMouseMoveFunc( glWindow w, GLenum (*f)( glWindow w, void *user_data, int pos_x, int pos_y, GLenum button_shift_mask ) );/* Set function to be called after moving the mouse. For the meaning ofthe parameters, see \xref{glwSetMouseDownFunc} %-----------------------------------------------------------------*//*\subsection{Inquiries}*//*\func{glwGetTitle}*/char* glwGetTitle( glWindow w );/*\func{glwGetWindowSize}*/void glwGetWindowSize( glWindow w, int *width, int *heigth );/*\func{glwIsMesa}*/int glwIsMesa(glWindow w);/*%-----------------------------------------------------------------*//*\subsection{Text output} OpenGL does not support text output by itself. But it is possibleto ''load'' system bitmap fonts or bitmap fonts and to make themaccessible via the display list mechanism. We took here some linesof code from the OpenGL FAQ to access X11 fonts. %-----------------------------------------------------------------*//*\func{glwSetFontSize}*/void glwSetFontSize(glWindow w,double size);/* Set font size to size (measured in multiples of the window height)*/ /*%-----------------------------------------------------------------*//*\func{glwPrint}*/void glwPrint( glWindow w, char *s );/*Print string at actual raster position (see glRasterpos stuff in theOpenGL documentation).%-----------------------------------------------------------------*//*\func{glwPrintf}*/void glwPrintf( glWindow w, char *format, ... );/*Print formatted string at actual raster position (see glRasterpos stuff in theOpenGL documentation).*//*\subsection{Feedback buffer interface}*//* This is an internal gltools interface to the feedback buffer management of glwin. The main thing one has to remember when parsing feedback buffers is, that currently, glPasstrough with positive values is used to mark strings which are passed to postscript just as strings, not as bitmaps. */void glwRenderFB(glWindow w);/* Render to feedback buffer. */void glwResetFB(glWindow w);/* Reset feedback buffer. */float *glwGetFB(glWindow w);/* Get feedback buffer. */int glwGetFBSize(glWindow w);/* Get feedback buffer size. */char *glwGetFBString(glWindow w,int istring);/* Get ith string from list.*/double glwGetFBStringSize(glWindow w,int istring);/* Get font size of ith string;*//*\subsection{Obsolete functions, maintained for backward compatibility}*/void glwInitPosition(int x,int y,int w, int h );void glwSetIdleFunc(glWindow,void (*)(glWindow w, void *user_data));/* Set draw procedure and application driven mode*/void glwSetDisplayFunc(glWindow,void (*)(glWindow w, void *user_data)); /* Set draw procedure and event driven mode*//*\subsection{Things from tk never used and never checked.}*/GLenum glwSetWindowLevel(glWindow ,GLenum);int glwGetColorMapSize(glWindow w);void glwGetMouseLoc(glWindow w,int *, int *);void glwSetOneColor(glWindow w, int, float, float, float);void glwSetFogRamp(glWindow w,int, int);void glwSetGreyRamp(glWindow w);void glwSetRGBMap(glWindow w,int, float *);void glwSetOverlayMap(glWindow w,int, float *);/*Various stuff.*/#define GLW_IS_RGB(x) (((x) & GLW_INDEX) == 0)#define GLW_IS_INDEX(x) (((x) & GLW_INDEX) != 0)#define GLW_IS_SINGLE(x) (((x) & GLW_DOUBLE) == 0)#define GLW_IS_DOUBLE(x) (((x) & GLW_DOUBLE) != 0)#define GLW_IS_DIRECT(x) (((x) & GLW_INDIRECT) == 0)#define GLW_IS_INDIRECT(x) (((x) & GLW_INDIRECT) != 0)#define GLW_HAS_ACCUM(x) (((x) & GLW_ACCUM) != 0)#define GLW_HAS_ALPHA(x) (((x) & GLW_ALPHA) != 0)#define GLW_HAS_DEPTH(x) (((x) & GLW_DEPTH) != 0)#define GLW_HAS_OVERLAY(x) (((x) & GLW_OVERLAY) != 0)#define GLW_HAS_UNDERLAY(x) (((x) & GLW_UNDERLAY) != 0)#define GLW_HAS_STENCIL(x) (((x) & GLW_STENCIL) != 0)#define GLW_IS_PIXMAP(x) (((x) & GLW_PIXMAP) != 0)/* Color Macros*/enum { GLW_BLACK = 0, GLW_RED, GLW_GREEN, GLW_YELLOW, GLW_BLUE, GLW_MAGENTA, GLW_CYAN, GLW_WHITE};extern float glwRGBMap[8][3];#define GLW_SETCOLOR(x, y) (GLW_IS_RGB((x)) ? \ glColor3fv(glwRGBMap[(y)]) : glwndexf((y)))/* RGB Image Structure*/typedef struct _GLW_RGBImageRec { GLint sizeX, sizeY; unsigned char *data;} GLW_RGBImageRec;#endif/* % % $Log: glwin.h,v $ % Revision 2.33 2000/05/09 14:24:21 schmelze % *** empty log message *** % % Revision 2.32 2000/02/22 17:27:06 fuhrmann % * transient_for in glwin % * 0.1a Version of WIASTwoPhase % % Revision 2.31 1999/12/21 17:18:55 fuhrmann % doc update for gltools-2-3 % % Revision 2.30 1999/09/17 16:35:01 fuhrmann % feedback stuff war kaputtrepariert... % % Revision 2.29 1999/09/15 16:16:24 fuhrmann % size_t for feedback buffer % file !=NULL check for dump files % % Revision 2.28 1999/07/02 10:38:05 fuhrmann % Mesa bug neutralized, gleps reference taken out of glwin % % Revision 2.27 1999/07/01 17:09:12 fuhrmann % tested portability (Linux, IRIX, DUNIX) % % Revision 2.26 1999/06/30 13:07:50 fuhrmann % font size stuff % % Revision 2.25 1999/06/30 10:27:25 fuhrmann % some bells &whistles in feedback stuff % % Revision 2.24 1999/06/29 17:56:24 fuhrmann % Feedback buffer is used now... % % Revision 2.23 1998/09/04 15:25:48 fuhrmann % skip frame option in StartRecording % % Revision 2.22 1998/03/11 19:21:05 fuhrmann % Hey we can create batch videos! (still beta, but...) % % Revision 2.21 1998/03/06 16:48:06 fuhrmann % some doc bugs removed % % Revision 2.20 1998/03/06 16:45:32 fuhrmann % tiff->ppm % print command % video recording % % Revision 2.19 1998/01/15 13:42:26 fuhrmann % prevent segmentation fault in key action registry % % Revision 2.18 1998/01/14 18:27:35 fuhrmann % Merge mit Ilja % % Revision 2.17 1997/11/27 19:03:10 fuhrmann % glwRecord stuff, PAL-Format, tex-file for keys % % Revision 2.16 1997/11/24 17:51:36 fuhrmann % revision history out of doc % % Revision 2.15 1997/10/27 14:39:45 fuhrmann % doc stuff % % Revision 2.14 1997/10/17 16:55:14 fuhrmann % glwFlush % % Revision 2.13 1997/10/01 15:41:28 fuhrmann % GLW_MOD1 % % Revision 2.12 1997/05/20 16:01:00 fuhrmann % no more rcs style, standalone compilation % % Revision 2.11 1997/05/20 11:16:15 fuhrmann % minor ajustment in doc % % Revision 2.10 1997/05/19 18:09:14 fuhrmann % func,xref % % Revision 2.9 1997/05/19 15:46:13 fuhrmann % no standalone compilation of doc % % Revision 2.8 1997/04/02 15:22:36 fuhrmann % documentation using c2latex % % Revision 2.7 1997/02/28 17:40:59 fuhrmann % glwGrab code % % Revision 2.6 1997/02/05 16:58:43 fuhrmann % removed comment problem on SGI % % Revision 2.5 1996/10/09 16:34:11 fuhrmann % keys next, prev, tab % % Revision 2.4 1996/09/23 17:00:01 fuhrmann % improved documentation % % Revision 2.3 1996/09/23 11:57:25 fuhrmann % documentation using xdoc % % Revision 2.2 1996/09/06 18:24:46 fuhrmann % external for glwRGBMap % % Revision 2.1 1996/09/03 09:09:18 fuhrmann % - fonts & printing characters % - keep aspect ratio % - dump pixmap size can default to window size % % Revision 2.0 1996/02/15 19:57:10 fuhrmann % First meta-stable distribution % % Revision 1.5 1996/02/09 16:44:44 fuhrmann % - shift keys now part of button mask % - more keysyms available % % Revision 1.4 1996/02/06 09:59:21 fuhrmann % - glwDump ( depends on libtiff.a !) % - glwSetIdleFunc and glwSetDisplayFunc obsolete, % use glwSetRedrawFunc & glwSetControlMode (better to understand) % - Header file comments as programmer's doc % % Revision 1.3 1995/11/08 12:19:01 fuhrmann % glwSetTitle introduced % % Revision 1.2 1995/10/24 18:34:53 fuhrmann % Merge mit libtk-1.1 (dmPolicy) % % Revision 1.1 1995/10/20 15:42:38 fuhrmann % Initial revision % glwin.h: Open GL / MesaGL to X11 interface toolkit, % derived from tk (see below) % 1994/15/11 hacked by Juergen Fuhrmann, fuhrmann@wias-berlin.d400.de % 1995/07/06 fitted to Mesa (minor adjustments % concerning colormap allocations) % % Revision 1.1.2.3 1994/01/21 17:05:31 John_Dennis % brought file up to SGI 1.0.12 release % [1994/01/21 14:32:53 John_Dennis] % % Revision 1.1.2.2 1993/10/07 20:12:43 John_Dennis % new files in SGI OpenGL 1.0.11 release % [1993/10/07 18:48:33 John_Dennis] % % $EndLog$ % */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -