1 /***********************************************************************/
2 /* Open Visualization Data Explorer                                    */
3 /* (C) Copyright IBM Corp. 1989,1999                                   */
4 /* ALL RIGHTS RESERVED                                                 */
5 /* This code licensed under the                                        */
6 /*    "IBM PUBLIC LICENSE - Open Visualization Data Explorer"          */
7 /***********************************************************************/
8 
9 #include <dxconfig.h>
10 
11 
12 /*
13  * $Header: /src/master/dx/src/exec/hwrender/gl/hwPortGL.h,v 1.3 1999/05/10 15:45:36 gda Exp $
14  */
15 
16 #ifndef tdmPortGL_h
17 #define tdmPortGL_h
18 /*---------------------------------------------------------------------------*\
19  $Source: /src/master/dx/src/exec/hwrender/gl/hwPortGL.h,v $
20   Author: Mark Hood
21 
22   Data structures used by IBM GL implementation of the TDM renderer.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #define MAX_CLIP_PLANES	6
27 
28 typedef struct ClipPlaneS {
29   float	a,b,c,d;
30 } ClipPlaneT,ClipPlane;
31 
32 typedef struct
33 {
34   int gid ;
35   int gltype ;
36   char gversion_string[32] ;
37   RGBColor background_color;
38   int	winHeight;		/* need this to flip images */
39   hwTranslationP	translation;
40   int			clipPlaneCount;
41   ClipPlane		clipPlanes[MAX_CLIP_PLANES];
42   HashTable displayListHash;
43   int doDisplayLists;
44   int currentTexture;
45 
46 } tdmGLctxT, *tdmGLctx ;
47 
48 #define DEFCONTEXT(ctx) \
49   register tdmGLctx _portContext = (tdmGLctx)(ctx)
50 
51 #define GID (((tdmGLctx)_portContext)->gid)
52 #define GLTYPE (((tdmGLctx)_portContext)->gltype)
53 #define GVERSION_STRING (((tdmGLctx)_portContext)->gversion_string)
54 #define BACKGROUND_COLOR (((tdmGLctx)_portContext)->background_color)
55 #define WINHEIGHT (((tdmGLctx)_portContext)->winHeight)
56 #define GLTRANSLATION (((tdmGLctx)_portContext)->translation)
57 #define CLIP_PLANE_CNT (((tdmGLctx)_portContext)->clipPlaneCount)
58 #define CLIP_PLANES (((tdmGLctx)_portContext)->clipPlanes)
59 #define DO_DISPLAY_LISTS  (((tdmGLctx)_portContext)->doDisplayLists)
60 #define DISPLAY_LIST_HASH (((tdmGLctx)_portContext)->displayListHash)
61 #define CURTEX            (((tdmGLctx)_portContext)->currentTexture)
62 
63 
64 #define PATTERN_INDEX 1
65 
66 #endif /* tdmPortGL_h */
67