source: trunk/src/opengl/mesa/wmesadef.h@ 22145

Last change on this file since 22145 was 21479, checked in by dmik, 15 years ago

Get rid of dd_obj_base.h which duplicates obj_base.h creating unnecessary mess (symbol/define duplication) and conflicts when both the DDarw and other COM-related headers are included.

File size: 6.9 KB
Line 
1/* $Id: wmesadef.h,v 1.3 2000-05-23 20:35:00 jeroen Exp $ */
2/* File name : wmesadef.h
3 * Version : 2.3
4 *
5 * Header file for display driver for Mesa 2.3 under
6 * Windows95, WindowsNT and Win32
7 *
8 * Copyright (C) 1996- Li Wei
9 * Address : Institute of Artificial Intelligence
10 * : & Robotics
11 * : Xi'an Jiaotong University
12 * Email : liwei@aiar.xjtu.edu.cn
13 * Web page : http://sun.aiar.xjtu.edu.cn
14 *
15 * This file and its associations are partially based on the
16 * Windows NT driver for Mesa, written by Mark Leaming
17 * (mark@rsinc.com).
18 */
19
20/*
21 * $Log: wmesadef.h,v $
22 * Revision 1.3 2000-05-23 20:35:00 jeroen
23 * *** empty log message ***
24 *
25 * Revision 1.2 2000/03/01 18:49:40 jeroen
26 * *** empty log message ***
27 *
28 * Revision 1.1 2000/02/29 00:48:44 sandervl
29 * created
30 *
31 * Revision 1.1.1.1 1999/08/19 00:55:42 jtg
32 * Imported sources
33 *
34 * Revision 1.3 1999/01/03 03:08:57 brianp
35 * Ted Jump's changes
36 *
37 * Initial version 1997/6/14 CST by Li Wei(liwei@aiar.xjtu.edu.cn)
38 */
39
40/*
41 * $Log: wmesadef.h,v $
42 * Revision 1.3 2000-05-23 20:35:00 jeroen
43 * *** empty log message ***
44 *
45 * Revision 1.2 2000/03/01 18:49:40 jeroen
46 * *** empty log message ***
47 *
48 * Revision 1.1 2000/02/29 00:48:44 sandervl
49 * created
50 *
51 * Revision 1.1.1.1 1999/08/19 00:55:42 jtg
52 * Imported sources
53 *
54 * Revision 1.3 1999/01/03 03:08:57 brianp
55 * Ted Jump's changes
56 *
57 * Revision 2.1 1996/11/15 10:54:00 CST by Li Wei(liwei@aiar.xjtu.edu.cn)
58 * a new element added to wmesa_context :
59 * dither_flag
60 */
61
62/*
63 * $Log: wmesadef.h,v $
64 * Revision 1.3 2000-05-23 20:35:00 jeroen
65 * *** empty log message ***
66 *
67 * Revision 1.2 2000/03/01 18:49:40 jeroen
68 * *** empty log message ***
69 *
70 * Revision 1.1 2000/02/29 00:48:44 sandervl
71 * created
72 *
73 * Revision 1.1.1.1 1999/08/19 00:55:42 jtg
74 * Imported sources
75 *
76 * Revision 1.3 1999/01/03 03:08:57 brianp
77 * Ted Jump's changes
78 *
79 * Revision 2.0 1996/11/15 10:54:00 CST by Li Wei(liwei@aiar.xjtu.edu.cn)
80 * Initial revision
81 */
82
83
84
85#ifndef DDMESADEF_H
86#define DDMESADEF_H
87
88#if defined(DDRAW)
89#include <ddraw.h>
90#endif
91
92#define REDBITS 0x03
93#define REDSHIFT 0x00
94#define GREENBITS 0x03
95#define GREENSHIFT 0x03
96#define BLUEBITS 0x02
97#define BLUESHIFT 0x06
98
99typedef HANDLE ULONG;
100
101typedef struct _dibSection{
102 HDC hDC;
103 HANDLE hFileMap;
104 BOOL fFlushed;
105 LPVOID base;
106}WMDIBSECTION, *PWMDIBSECTION;
107
108typedef struct tagMY_RECTL
109 {
110 LONG xLeft,xRight,yBottom,yTop;
111 }MY_RECTL;
112
113typedef struct wmesa_context{
114 /* This defs *MUST* be at the TOP, since some structure definitions below */
115 /* are NOT correct!! This is because of the fact that wmesa is WIN based, */
116 /* whereas this file is OS/2 based. If we put this stuff at the end of the */
117 /* structure the offsets to for example the hDiveInstance will be */
118 /* interpreted differently in this file and in wmesa.c. */
119#ifdef DIVE
120 ULONG hDiveInstance; /* This actually is a DIVE Handle */
121 ULONG BackBufferNumber;
122 PVOID ppFrameBuffer; /* FrameBuffer address - used for DIRECT access to screen only */
123 ULONG ScanLineBytes,ScanLines;
124 POINT WinPos;
125 WNDPROC hWndProc;
126 BOOL DiveSoftwareBlit;/* If BlitSetup failed do it in SW*/
127 ULONG NumClipRects; /* Clip-info is maintained here */
128 MY_RECTL rctls[50];
129 HRGN hrgn;
130 HDC hps;
131 BOOL BackBufferOwnAllocation;
132 GLint awidth,aheight;/* Allocated w/h for ImageBuffer */
133#endif
134 PBYTE pbPixels;
135 int nColors;
136 BYTE cColorBits;
137 int pixelformat;
138 GLboolean db_flag; /* double buffered? */
139 GLboolean rgb_flag; /* RGB mode? */
140 GLboolean dither_flag;/* use dither when 256 color mode for RGB?*/
141 GLuint depth; /* bits per pixel (1, 8, 24, etc) */
142 ULONG pixel; /* current color index or RGBA pixel value*/
143 ULONG clearpixel; //* pixel for clearing the color buffers*/
144 GLuint width;
145 GLuint height;
146 unsigned long ScanWidth;
147
148 GLcontext *gl_ctx; /* The core GL/Mesa context*/
149 GLvisual *gl_visual; /* Describes the buffers*/
150 GLframebuffer *gl_buffer; /* Depth, stencil, accum, etc buffers*/
151
152 /* 3D projection stuff */
153 RECT drawRect;
154 UINT uiDIBoffset;
155 /* OpenGL stuff */
156 HPALETTE hGLPalette;
157 PBYTE ScreenMem; /* WinG memory */
158 BITMAPINFO *IndexFormat;
159 HPALETTE hPal; /* Current Palette */
160 HPALETTE hPalHalfTone;
161
162
163 WMDIBSECTION dib;
164 BITMAPINFO bmi;
165 HBITMAP hbmDIB;
166 HBITMAP hOldBitmap;
167 HBITMAP Old_Compat_BM;
168 HBITMAP Compat_BM;/* Bitmap for double buffering*/
169
170 HWND Window;
171 HDC hDC;
172 HPALETTE hPalette;
173 HPALETTE hOldPalette;
174 HPEN hPen;
175 HPEN hOldPen;
176 HCURSOR hOldCursor;
177 COLORREF crColor;
178#ifdef DDRAW
179 LPDIRECTDRAW lpDD; /* DirectDraw object */
180// LPDIRECTDRAW2 lpDD2; /* DirectDraw object*/
181 LPDIRECTDRAWSURFACE lpDDSPrimary; /* DirectDraw primary surface*/
182 LPDIRECTDRAWSURFACE lpDDSOffScreen; // DirectDraw off screen surface
183 LPDIRECTDRAWPALETTE lpDDPal; // DirectDraw palette
184 BOOL bActive; /* is application active? */
185 DDSURFACEDESC ddsd;
186 int fullScreen;
187 int gMode ;
188#endif
189 RECT rectOffScreen;
190 RECT rectSurface;
191 HWND hwnd;
192 DWORD pitch;
193 PBYTE addrOffScreen;
194 /* #ifdef PROFILE */
195 /* MESAPROF profile; */
196 /* #endif */
197} *PWMC;
198
199
200#define PAGE_FILE 0xffffffff
201
202
203
204#endif
Note: See TracBrowser for help on using the repository browser.