gallium/draw: initial code to properly support llvm in the draw module
[mesa.git] / src / mesa / drivers / d3d / D3DMESA.H
1 /*===========================================================================*/
2 /* */
3 /* Mesa-3.0 DirectX 6 Driver */
4 /* */
5 /* By Leigh McRae */
6 /* */
7 /* http://www.altsoftware.com/ */
8 /* */
9 /* Copyright (c) 1999-1998 alt.software inc. All Rights Reserved */
10 /*===========================================================================*/
11 #ifndef D3D_MESA_H
12 #define D3D_MESA_H
13 /*===========================================================================*/
14 /* Includes. */
15 /*===========================================================================*/
16 #include <windows.h>
17 #include <ddraw.h>
18 #include <d3d.h>
19 #include "matrix.h"
20 #include "context.h"
21 #include "mtypes.h"
22 #include "vb.h"
23 #include "D3DShared.h"
24 #include "Debug.h"
25 #include "NULLProcs.h"
26 /*===========================================================================*/
27 /* Macros. */
28 /*===========================================================================*/
29 #define FLIP(h,y) (h-y)
30 /*===========================================================================*/
31 /* Magic numbers. */
32 /*===========================================================================*/
33 /*===========================================================================*/
34 /* Type defines. */
35 /*===========================================================================*/
36 struct __extensions__
37 {
38 PROC proc;
39 char *name;
40 };
41
42 typedef GLbitfield (*ClearPROC)( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height );
43 typedef void (*WSpanRGBPROC)( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte rgb[][3], const GLubyte mask[] );
44 typedef void (*WSpanRGBAPROC)( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte rgba[][4], const GLubyte mask[] );
45 typedef void (*WSpanRGBAMonoPROC)( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte mask[] );
46 typedef void (*WPixelsRGBAPROC)( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte rgba[][4], const GLubyte mask[] );
47 typedef void (*WPixelsRGBAMonoPROC)( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte mask[] );
48 typedef void (*RSpanRGBAPROC)( const GLcontext* ctx, GLuint n, GLint x, GLint y, GLubyte rgba[][4] );
49 typedef void (*RPixelsRGBAPROC)( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], GLubyte rgba[][4], const GLubyte mask[] );
50
51 typedef struct D3D_mesa_context
52 {
53 PMESAD3DSHARED pShared;
54
55 GLcontext *gl_ctx; /* The core GL/Mesa context */
56 GLvisual *gl_visual; /* Describes the buffers */
57 GLframebuffer *gl_buffer; /* Depth, stencil, accum, etc buffers */
58
59 HDC hdc;
60 WNDPROC hOldProc;
61
62 UCHAR rClear, /* Current clear colors. */
63 gClear,
64 bClear,
65 aClear,
66 rCurrent, /* Current rendering colors. */
67 gCurrent,
68 bCurrent,
69 aCurrent;
70
71 struct D3D_mesa_context *next;
72
73 } D3DMESACONTEXT, *PD3DMESACONTEXT;
74 /*===========================================================================*/
75 /* Extern function prototypes. */
76 /*===========================================================================*/
77 extern void gl_Viewport( GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height );
78 /*===========================================================================*/
79 /* Global variables. */
80 /*===========================================================================*/
81 extern D3DTLVERTEX D3DTLVertices[(VB_MAX*6)];
82
83 #endif
84