summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/windows/gdi/wmesadef.h
diff options
context:
space:
mode:
authorKarl Schultz <kschultz@freedesktop.org>2006-03-30 07:58:24 +0000
committerKarl Schultz <kschultz@freedesktop.org>2006-03-30 07:58:24 +0000
commit87af12dbdcb078b95391d57dabe53ce17b19f651 (patch)
tree20c22ec3b2877fe9a66f0b4ca9d9014bcafa1dde /src/mesa/drivers/windows/gdi/wmesadef.h
parenta8c9ecfab005088b1b201abc9d04f5169d1b3b64 (diff)
Fixes from Brian to help migrate to render buffer DD interfaces. Also fix bug in the viewport function that was using the viewport size to resize the buffer, when it should have been using the window size. Fix bug in write_rgb_span_32 where the incoming pixel data parameter was coded as a [][4] instead of [][3]. Now all the demos work correctly except singlebuffer.
Diffstat (limited to 'src/mesa/drivers/windows/gdi/wmesadef.h')
-rw-r--r--src/mesa/drivers/windows/gdi/wmesadef.h41
1 files changed, 28 insertions, 13 deletions
diff --git a/src/mesa/drivers/windows/gdi/wmesadef.h b/src/mesa/drivers/windows/gdi/wmesadef.h
index 8b2f4912d6..296000a12f 100644
--- a/src/mesa/drivers/windows/gdi/wmesadef.h
+++ b/src/mesa/drivers/windows/gdi/wmesadef.h
@@ -1,27 +1,28 @@
+#ifndef WMESADEF_H
+#define WMESADEF_H
#include "context.h"
-typedef struct _dibSection{
+typedef struct _dibSection {
HDC hDC;
HANDLE hFileMap;
BOOL fFlushed;
LPVOID base;
-}WMDIBSECTION, *PWMDIBSECTION;
+} WMDIBSECTION, *PWMDIBSECTION;
-typedef struct wmesa_context{
- GLcontext *gl_ctx; /* The core GL/Mesa context */
- GLvisual *gl_visual; /* Describes the buffers */
- GLframebuffer *gl_buffer; /* Depth, stencil, accum, etc buffers*/
+/**
+ * The Windows Mesa rendering context, derived from GLcontext.
+ */
+struct wmesa_context {
+ GLcontext gl_ctx; /* The core GL/Mesa context */
HDC hDC;
COLORREF clearColorRef;
HPEN clearPen;
HBRUSH clearBrush;
- GLuint width;
- GLuint height;
- GLuint ScanWidth;
- GLboolean rgb_flag;
- GLboolean db_flag;
- GLboolean alpha_flag;
+ GLuint ScanWidth; /* XXX move into wmesa_framebuffer */
+ GLboolean rgb_flag; /* XXX remove - use gl_visual field */
+ GLboolean db_flag; /* XXX remove - use gl_visual field */
+ GLboolean alpha_flag; /* XXX remove - use gl_visual field */
WMDIBSECTION dib;
BITMAPINFO bmi;
HBITMAP hbmDIB;
@@ -29,6 +30,20 @@ typedef struct wmesa_context{
PBYTE pbPixels;
BYTE cColorBits;
int pixelformat;
-} *PWMC;
+};
+/**
+ * Windows framebuffer, derived from gl_framebuffer
+ */
+struct wmesa_framebuffer
+{
+ struct gl_framebuffer Base;
+ HDC hdc;
+ struct wmesa_framebuffer *next;
+};
+
+typedef struct wmesa_framebuffer *WMesaFramebuffer;
+
+
+#endif /* WMESADEF_H */