Declare debug channels in all dlls that need them; added imports of
[wine] / dlls / ddraw / d3dcommon.c
1 /* Direct3D Common functions
2    (c) 1998 Lionel ULMER
3    
4    This file contains all common miscellaneous code that spans
5    different 'objects' */
6
7 #include "windef.h"
8 #include "wine/obj_base.h"
9 #include "ddraw.h"
10 #include "d3d.h"
11 #include "debugtools.h"
12
13 #include "d3d_private.h"
14
15 DEFAULT_DEBUG_CHANNEL(ddraw)
16
17 void _dump_renderstate(D3DRENDERSTATETYPE type, DWORD value) {
18   char *states[] = {
19     NULL,
20     "D3DRENDERSTATE_TEXTUREHANDLE",
21     "D3DRENDERSTATE_ANTIALIAS",
22     "D3DRENDERSTATE_TEXTUREADDRESS",
23     "D3DRENDERSTATE_TEXTUREPERSPECTIVE",
24     "D3DRENDERSTATE_WRAPU",
25     "D3DRENDERSTATE_WRAPV",
26     "D3DRENDERSTATE_ZENABLE",
27     "D3DRENDERSTATE_FILLMODE",
28     "D3DRENDERSTATE_SHADEMODE",
29     "D3DRENDERSTATE_LINEPATTERN",
30     "D3DRENDERSTATE_MONOENABLE",
31     "D3DRENDERSTATE_ROP2",
32     "D3DRENDERSTATE_PLANEMASK",
33     "D3DRENDERSTATE_ZWRITEENABLE",
34     "D3DRENDERSTATE_ALPHATESTENABLE",
35     "D3DRENDERSTATE_LASTPIXEL",
36     "D3DRENDERSTATE_TEXTUREMAG",
37     "D3DRENDERSTATE_TEXTUREMIN",
38     "D3DRENDERSTATE_SRCBLEND",
39     "D3DRENDERSTATE_DESTBLEND",
40     "D3DRENDERSTATE_TEXTUREMAPBLEND",
41     "D3DRENDERSTATE_CULLMODE",
42     "D3DRENDERSTATE_ZFUNC",
43     "D3DRENDERSTATE_ALPHAREF",
44     "D3DRENDERSTATE_ALPHAFUNC",
45     "D3DRENDERSTATE_DITHERENABLE",
46     "D3DRENDERSTATE_ALPHABLENDENABLE",
47     "D3DRENDERSTATE_FOGENABLE",
48     "D3DRENDERSTATE_SPECULARENABLE",
49     "D3DRENDERSTATE_ZVISIBLE",
50     "D3DRENDERSTATE_SUBPIXEL",
51     "D3DRENDERSTATE_SUBPIXELX",
52     "D3DRENDERSTATE_STIPPLEDALPHA",
53     "D3DRENDERSTATE_FOGCOLOR",
54     "D3DRENDERSTATE_FOGTABLEMODE",
55     "D3DRENDERSTATE_FOGTABLESTART",
56     "D3DRENDERSTATE_FOGTABLEEND",
57     "D3DRENDERSTATE_FOGTABLEDENSITY",
58     "D3DRENDERSTATE_STIPPLEENABLE",
59     "D3DRENDERSTATE_EDGEANTIALIAS",
60     "D3DRENDERSTATE_COLORKEYENABLE",
61     "ERR",
62     "D3DRENDERSTATE_BORDERCOLOR",
63     "D3DRENDERSTATE_TEXTUREADDRESSU",
64     "D3DRENDERSTATE_TEXTUREADDRESSV",
65     "D3DRENDERSTATE_MIPMAPLODBIAS",
66     "D3DRENDERSTATE_ZBIAS",
67     "D3DRENDERSTATE_RANGEFOGENABLE",
68     "D3DRENDERSTATE_ANISOTROPY",
69     "D3DRENDERSTATE_FLUSHBATCH",
70     "ERR", "ERR", "ERR", "ERR", "ERR", "ERR", "ERR",
71     "ERR", "ERR", "ERR", "ERR", "ERR", "ERR",
72     "D3DRENDERSTATE_STIPPLEPATTERN00",
73     "D3DRENDERSTATE_STIPPLEPATTERN01",
74     "D3DRENDERSTATE_STIPPLEPATTERN02",
75     "D3DRENDERSTATE_STIPPLEPATTERN03",
76     "D3DRENDERSTATE_STIPPLEPATTERN04",
77     "D3DRENDERSTATE_STIPPLEPATTERN05",
78     "D3DRENDERSTATE_STIPPLEPATTERN06",
79     "D3DRENDERSTATE_STIPPLEPATTERN07",
80     "D3DRENDERSTATE_STIPPLEPATTERN08",
81     "D3DRENDERSTATE_STIPPLEPATTERN09",
82     "D3DRENDERSTATE_STIPPLEPATTERN10",
83     "D3DRENDERSTATE_STIPPLEPATTERN11",
84     "D3DRENDERSTATE_STIPPLEPATTERN12",
85     "D3DRENDERSTATE_STIPPLEPATTERN13",
86     "D3DRENDERSTATE_STIPPLEPATTERN14",
87     "D3DRENDERSTATE_STIPPLEPATTERN15",
88     "D3DRENDERSTATE_STIPPLEPATTERN16",
89     "D3DRENDERSTATE_STIPPLEPATTERN17",
90     "D3DRENDERSTATE_STIPPLEPATTERN18",
91     "D3DRENDERSTATE_STIPPLEPATTERN19",
92     "D3DRENDERSTATE_STIPPLEPATTERN20",
93     "D3DRENDERSTATE_STIPPLEPATTERN21",
94     "D3DRENDERSTATE_STIPPLEPATTERN22",
95     "D3DRENDERSTATE_STIPPLEPATTERN23",
96     "D3DRENDERSTATE_STIPPLEPATTERN24",
97     "D3DRENDERSTATE_STIPPLEPATTERN25",
98     "D3DRENDERSTATE_STIPPLEPATTERN26",
99     "D3DRENDERSTATE_STIPPLEPATTERN27",
100     "D3DRENDERSTATE_STIPPLEPATTERN28",
101     "D3DRENDERSTATE_STIPPLEPATTERN29",
102     "D3DRENDERSTATE_STIPPLEPATTERN30",
103     "D3DRENDERSTATE_STIPPLEPATTERN31"
104   };
105   DPRINTF(" %s = 0x%08lx\n", states[type], value);
106 }