Debian Codegraph @

debian/external_deps/fetk/sg/src/gl/wmesadef.h

raw
1 /* File name : wmesadef.h
2 * Version : 2.0
3 *
4 * Header file for display driver for Mesa 2.0 under
5 * Windows95, WindowsNT and Win32
6 *
7 * Copyright (C) 1996- Li Wei
8 * Address : Institute of Artificial Intelligence
9 * : & Robotics
10 * : Xi'an Jiaotong University
11 * Email : [email protected]
12 * Web page : http://sun.aiar.xjtu.edu.cn
13 *
14 * This file and its associations are partially based on the
15 * Windows NT driver for Mesa, written by Mark Leaming
16 * ([email protected]).
17 */
18
19
20 #ifndef WMESADEF_H
21 #define WMESADEF_H
22
23 #include <GL\gl.h>
24 #include <context.h>
25 //#include "profile.h"
26
27 #define REDBITS 0x03
28 #define REDSHIFT 0x00
29 #define GREENBITS 0x03
30 #define GREENSHIFT 0x03
31 #define BLUEBITS 0x02
32 #define BLUESHIFT 0x06
33
34
35 typedef struct _dibSection{
36 HDC hDC;
37 HANDLE hFileMap;
38 BOOL fFlushed;
39 LPVOID base;
40 }WMDIBSECTION, *PWMDIBSECTION;
41
42
43 typedef struct wmesa_context{
44 GLcontext *gl_ctx; /* The core GL/Mesa context */
45 GLvisual *gl_visual; /* Describes the buffers */
46 GLframebuffer *gl_buffer; /* Depth, stencil, accum, etc buffers */
47
48
49 HWND Window;
50 HDC hDC;
51 HPALETTE hPalette;
52 HPALETTE hOldPalette;
53 HPEN hPen;
54 HPEN hOldPen;
55 HCURSOR hOldCursor;
56 COLORREF crColor;
57 // 3D projection stuff
58 RECT drawRect;
59 UINT uiDIBoffset;
60 // OpenGL stuff
61 HPALETTE hGLPalette;
62 GLuint width;
63 GLuint height;
64 GLuint ScanWidth;
65 GLboolean db_flag; //* double buffered?
66 GLboolean rgb_flag; //* RGB mode?
67 GLuint depth; //* bits per pixel (1, 8, 24, etc)
68 ULONG pixel; // current color index or RGBA pixel value
69 ULONG clearpixel; //* pixel for clearing the color buffers
70 PSTR ScreenMem; // WinG memory
71 BITMAPINFO *IndexFormat;
72 HPALETTE hPal; // Current Palette
73
74 BITMAPINFO bmi;
75 HBITMAP hbmDIB;
76 HBITMAP hOldBitmap;
77 HBITMAP Old_Compat_BM;
78 HBITMAP Compat_BM; // Bitmap for double buffering
79 PBYTE pbPixels;
80 int nColors;
81 BYTE cColorBits;
82 WMDIBSECTION dib;
83 //#ifdef PROFILE
84 // MESAPROF profile;
85 //#endif
86 } *PWMC;
87
88
89 #define PAGE_FILE 0xffffffff
90
91
92 #include "colors.h"
93
94 #endif