diff options
author | Karl Schultz <kschultz@freedesktop.org> | 2001-11-01 22:44:47 +0000 |
---|---|---|
committer | Karl Schultz <kschultz@freedesktop.org> | 2001-11-01 22:44:47 +0000 |
commit | acf0c0a1e1a5dd3e99e4ae41ae81a67d2b2864b7 (patch) | |
tree | 8e0a0447b0c21b0a023387dc95f319fcf971cf1c /src/mesa/drivers/windows/wmesadef.h | |
parent | 52ef4cc59a4205c2b469d2158f1a72124e9bddf8 (diff) |
Updates for improved DirectDraw support (Daniel Slater)
Diffstat (limited to 'src/mesa/drivers/windows/wmesadef.h')
-rw-r--r-- | src/mesa/drivers/windows/wmesadef.h | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/src/mesa/drivers/windows/wmesadef.h b/src/mesa/drivers/windows/wmesadef.h index 9682c857e7..29fff9f4f5 100644 --- a/src/mesa/drivers/windows/wmesadef.h +++ b/src/mesa/drivers/windows/wmesadef.h @@ -57,10 +57,23 @@ #ifndef DDMESADEF_H #define DDMESADEF_H +// uncomment this to use DirectDraw driver +//#define DDRAW 1 +// uncomment this to use a pointer to a function for setting the pixels +// in the buffer +#define COMPILE_SETPIXEL 1 +// uncomment this to enable the fast win32 rasterizers ( commented out for MesaGL 4.0 ) +// #define FAST_RASTERIZERS 1 +// uncomment this to enable setting function pointers once inside of +// WMesaCreateContext instead of on every call to wmesa_update_state() +#define SET_FPOINTERS_ONCE 1 + + #include <windows.h> #include <GL\gl.h> #include "context.h" #ifdef DDRAW +#define DIRECTDRAW_VERSION 0x0100 #include <ddraw.h> #endif //#include "profile.h" @@ -79,6 +92,9 @@ typedef struct _dibSection{ LPVOID base; }WMDIBSECTION, *PWMDIBSECTION; +#ifdef COMPILE_SETPIXEL +typedef void (*SETPIXELTYPE)(struct wmesa_context *pwc, int iScanLine, int iPixel, BYTE r, BYTE g, BYTE b); +#endif typedef struct wmesa_context{ GLcontext *gl_ctx; /* The core GL/Mesa context */ @@ -132,15 +148,19 @@ typedef struct wmesa_context{ LPDIRECTDRAWSURFACE lpDDSOffScreen; // DirectDraw off screen surface LPDIRECTDRAWPALETTE lpDDPal; // DirectDraw palette BOOL bActive; // is application active? - DDSURFACEDESC ddsd; - int fullScreen; - int gMode ; + DDSURFACEDESC ddsd; // surface description + int fullScreen; // fullscreen ? + int gMode ; // fullscreen mode + LONG oldWndProc; // old Window proc. we need to hook WM_MOVE message to update the drawing rectangle #endif RECT rectOffScreen; RECT rectSurface; HWND hwnd; DWORD pitch; PBYTE addrOffScreen; +#ifdef COMPILE_SETPIXEL + SETPIXELTYPE wmSetPixel; +#endif // COMPILE_SETPIXEL //#ifdef PROFILE // MESAPROF profile; //#endif |