1 /* File name : wmesadef.h
4 * Header file for display driver for Mesa 2.3 under
5 * Windows95, WindowsNT and Win32
7 * Copyright (C) 1996- Li Wei
8 * Address : Institute of Artificial Intelligence
10 * : Xi'an Jiaotong University
11 * Email : liwei@aiar.xjtu.edu.cn
12 * Web page : http://sun.aiar.xjtu.edu.cn
14 * This file and its associations are partially based on the
15 * Windows NT driver for Mesa, written by Mark Leaming
20 * $Log: wmesadef.h,v $
21 * Revision 1.1 1999/08/19 00:55:42 jtg
24 * Revision 1.3 1999/01/03 03:08:57 brianp
27 * Initial version 1997/6/14 CST by Li Wei(liwei@aiar.xjtu.edu.cn)
31 * $Log: wmesadef.h,v $
32 * Revision 1.1 1999/08/19 00:55:42 jtg
35 * Revision 1.3 1999/01/03 03:08:57 brianp
38 * Revision 2.1 1996/11/15 10:54:00 CST by Li Wei(liwei@aiar.xjtu.edu.cn)
39 * a new element added to wmesa_context :
44 * $Log: wmesadef.h,v $
45 * Revision 1.1 1999/08/19 00:55:42 jtg
48 * Revision 1.3 1999/01/03 03:08:57 brianp
51 * Revision 2.0 1996/11/15 10:54:00 CST by Li Wei(liwei@aiar.xjtu.edu.cn)
66 //#include "profile.h"
70 #define GREENBITS 0x03
71 #define GREENSHIFT 0x03
73 #define BLUESHIFT 0x06
75 typedef struct _dibSection
{
80 }WMDIBSECTION
, *PWMDIBSECTION
;
83 typedef struct wmesa_context
{
84 GLcontext
*gl_ctx
; /* The core GL/Mesa context */
85 GLvisual
*gl_visual
; /* Describes the buffers */
86 GLframebuffer
*gl_buffer
; /* Depth, stencil, accum, etc buffers */
97 // 3D projection stuff
105 GLboolean db_flag
; //* double buffered?
106 GLboolean rgb_flag
; //* RGB mode?
107 GLboolean dither_flag
; //* use dither when 256 color mode for RGB?
108 GLuint depth
; //* bits per pixel (1, 8, 24, etc)
109 ULONG pixel
; // current color index or RGBA pixel value
110 ULONG clearpixel
; //* pixel for clearing the color buffers
111 PBYTE ScreenMem
; // WinG memory
112 BITMAPINFO
*IndexFormat
;
113 HPALETTE hPal
; // Current Palette
114 HPALETTE hPalHalfTone
;
121 HBITMAP Old_Compat_BM
;
122 HBITMAP Compat_BM
; // Bitmap for double buffering
129 LPDIRECTDRAW lpDD
; // DirectDraw object
130 // LPDIRECTDRAW2 lpDD2; // DirectDraw object
131 LPDIRECTDRAWSURFACE lpDDSPrimary
; // DirectDraw primary surface
132 LPDIRECTDRAWSURFACE lpDDSOffScreen
; // DirectDraw off screen surface
133 LPDIRECTDRAWPALETTE lpDDPal
; // DirectDraw palette
134 BOOL bActive
; // is application active?
150 #define PAGE_FILE 0xffffffff