summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/d3d/D3DMESA.H
blob: 074ceca816afd582fbf43ce9271d3c618e575f81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*===========================================================================*/
/*                                                                           */
/* Mesa-3.0 DirectX 6 Driver                                                 */
/*                                                                           */
/* By Leigh McRae                                                            */
/*                                                                           */
/* http://www.altsoftware.com/                                               */
/*                                                                           */
/* Copyright (c) 1999-1998  alt.software inc.  All Rights Reserved           */
/*===========================================================================*/
#ifndef D3D_MESA_H
#define D3D_MESA_H
/*===========================================================================*/
/* Includes.                                                                 */
/*===========================================================================*/
#include <windows.h>
#include <ddraw.h>
#include <d3d.h>
#include "matrix.h"
#include "context.h"
#include "mtypes.h"
#include "vb.h"
#include "D3DShared.h"
#include "Debug.h"
#include "NULLProcs.h"
/*===========================================================================*/
/* Macros.                                                                   */
/*===========================================================================*/
#define FLIP(h,y)                       (h-y)
/*===========================================================================*/
/* Magic numbers.                                                            */
/*===========================================================================*/
/*===========================================================================*/
/* Type defines.                                                             */
/*===========================================================================*/
struct __extensions__
{
   PROC  proc;
   char  *name;
};

typedef GLbitfield   (*ClearPROC)( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height );
typedef void         (*WSpanRGBPROC)( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte rgb[][3], const GLubyte mask[] );
typedef void         (*WSpanRGBAPROC)( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte rgba[][4], const GLubyte mask[] );
typedef void         (*WSpanRGBAMonoPROC)( const GLcontext* ctx, GLuint n, GLint x, GLint y, const GLubyte mask[] );
typedef void         (*WPixelsRGBAPROC)( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte rgba[][4], const GLubyte mask[] );
typedef void         (*WPixelsRGBAMonoPROC)( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte mask[] );
typedef void         (*RSpanRGBAPROC)( const GLcontext* ctx, GLuint n, GLint x, GLint y, GLubyte rgba[][4] );
typedef void         (*RPixelsRGBAPROC)( const GLcontext* ctx, GLuint n, const GLint x[], const GLint y[], GLubyte rgba[][4], const GLubyte mask[] );

typedef struct D3D_mesa_context 
{
  PMESAD3DSHARED        pShared;

  GLcontext             *gl_ctx;       /* The core GL/Mesa context */
  GLvisual              *gl_visual;    /* Describes the buffers */
  GLframebuffer *gl_buffer;    /* Depth, stencil, accum, etc buffers */

  HDC                   hdc;
  WNDPROC               hOldProc;

  UCHAR                 rClear,         /* Current clear colors. */
		    gClear,
		    bClear,
		    aClear,
		    rCurrent,           /* Current rendering colors. */
		    gCurrent,
		    bCurrent,
		    aCurrent;

   struct D3D_mesa_context *next;

} D3DMESACONTEXT, *PD3DMESACONTEXT;
/*===========================================================================*/
/* Extern function prototypes.                                               */
/*===========================================================================*/
extern void gl_Viewport( GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height );
/*===========================================================================*/
/* Global variables.                                                         */
/*===========================================================================*/
extern D3DTLVERTEX   D3DTLVertices[(VB_MAX*6)];

#endif