187af12dbdcb078b95391d57dabe53ce17b19f651Karl Schultz#ifndef WMESADEF_H
287af12dbdcb078b95391d57dabe53ce17b19f651Karl Schultz#define WMESADEF_H
3da49de811d5e74cf476399db9c641fdb8387dbb3José Fonseca
476fb8089103e9dba9aaa7232c86d864d5874a08fZhang#include <windows.h>
5da49de811d5e74cf476399db9c641fdb8387dbb3José Fonseca
615eaf8297ecb39337109b95480e61f37a6b20f0aJosé Fonseca#include "main/context.h"
7b6a74a4f6e17dc95c5b3fed73f77fb9b7d9ea806Karl Schultz
8b6a74a4f6e17dc95c5b3fed73f77fb9b7d9ea806Karl Schultz
987af12dbdcb078b95391d57dabe53ce17b19f651Karl Schultz/**
10f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg * The Windows Mesa rendering context, derived from struct gl_context.
1187af12dbdcb078b95391d57dabe53ce17b19f651Karl Schultz */
1287af12dbdcb078b95391d57dabe53ce17b19f651Karl Schultzstruct wmesa_context {
13f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg    struct gl_context           gl_ctx;	        /* The core GL/Mesa context */
14b6a74a4f6e17dc95c5b3fed73f77fb9b7d9ea806Karl Schultz    HDC                 hDC;
1545ab8cb08aaf641a397c1a30ac19f0942498430bKarl Schultz    COLORREF		clearColorRef;
1645ab8cb08aaf641a397c1a30ac19f0942498430bKarl Schultz    HPEN                clearPen;
1745ab8cb08aaf641a397c1a30ac19f0942498430bKarl Schultz    HBRUSH              clearBrush;
1887af12dbdcb078b95391d57dabe53ce17b19f651Karl Schultz};
19b6a74a4f6e17dc95c5b3fed73f77fb9b7d9ea806Karl Schultz
20b6a74a4f6e17dc95c5b3fed73f77fb9b7d9ea806Karl Schultz
2187af12dbdcb078b95391d57dabe53ce17b19f651Karl Schultz/**
2287af12dbdcb078b95391d57dabe53ce17b19f651Karl Schultz * Windows framebuffer, derived from gl_framebuffer
2387af12dbdcb078b95391d57dabe53ce17b19f651Karl Schultz */
2487af12dbdcb078b95391d57dabe53ce17b19f651Karl Schultzstruct wmesa_framebuffer
2587af12dbdcb078b95391d57dabe53ce17b19f651Karl Schultz{
2687af12dbdcb078b95391d57dabe53ce17b19f651Karl Schultz    struct gl_framebuffer Base;
27174ce730c6c9739121c02c7d58e7d8be377d2231Karl Schultz    HDC                 hDC;
28174ce730c6c9739121c02c7d58e7d8be377d2231Karl Schultz    int			pixelformat;
29174ce730c6c9739121c02c7d58e7d8be377d2231Karl Schultz    GLuint		ScanWidth;
3060121c41ce9ee50ff8d8476d4eb04867adf9b8c5Karl Schultz    int			cColorBits;
31174ce730c6c9739121c02c7d58e7d8be377d2231Karl Schultz    /* back buffer DIB fields */
32174ce730c6c9739121c02c7d58e7d8be377d2231Karl Schultz    HDC                 dib_hDC;
33174ce730c6c9739121c02c7d58e7d8be377d2231Karl Schultz    BITMAPINFO          bmi;
34174ce730c6c9739121c02c7d58e7d8be377d2231Karl Schultz    HBITMAP             hbmDIB;
35174ce730c6c9739121c02c7d58e7d8be377d2231Karl Schultz    HBITMAP             hOldBitmap;
36174ce730c6c9739121c02c7d58e7d8be377d2231Karl Schultz    PBYTE               pbPixels;
3787af12dbdcb078b95391d57dabe53ce17b19f651Karl Schultz    struct wmesa_framebuffer *next;
3887af12dbdcb078b95391d57dabe53ce17b19f651Karl Schultz};
3987af12dbdcb078b95391d57dabe53ce17b19f651Karl Schultz
4087af12dbdcb078b95391d57dabe53ce17b19f651Karl Schultztypedef struct wmesa_framebuffer *WMesaFramebuffer;
4187af12dbdcb078b95391d57dabe53ce17b19f651Karl Schultz
4287af12dbdcb078b95391d57dabe53ce17b19f651Karl Schultz
4387af12dbdcb078b95391d57dabe53ce17b19f651Karl Schultz#endif /* WMESADEF_H */
44