xref: /reactos/sdk/include/psdk/d3drmdef.h (revision c2c66aff)
1*c2c66affSColin Finck /*
2*c2c66affSColin Finck  * Copyright 2007,2010 Vijay Kiran Kamuju
3*c2c66affSColin Finck  * Copyright 2007 David ADAM
4*c2c66affSColin Finck  * Copyright 2010 Christian Costa
5*c2c66affSColin Finck  *
6*c2c66affSColin Finck  * This library is free software; you can redistribute it and/or
7*c2c66affSColin Finck  * modify it under the terms of the GNU Lesser General Public
8*c2c66affSColin Finck  * License as published by the Free Software Foundation; either
9*c2c66affSColin Finck  * version 2.1 of the License, or (at your option) any later version.
10*c2c66affSColin Finck  *
11*c2c66affSColin Finck  * This library is distributed in the hope that it will be useful,
12*c2c66affSColin Finck  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13*c2c66affSColin Finck  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14*c2c66affSColin Finck  * Lesser General Public License for more details.
15*c2c66affSColin Finck  *
16*c2c66affSColin Finck  * You should have received a copy of the GNU Lesser General Public
17*c2c66affSColin Finck  * License along with this library; if not, write to the Free Software
18*c2c66affSColin Finck  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19*c2c66affSColin Finck  */
20*c2c66affSColin Finck 
21*c2c66affSColin Finck #ifndef __D3DRMDEFS_H__
22*c2c66affSColin Finck #define __D3DRMDEFS_H__
23*c2c66affSColin Finck 
24*c2c66affSColin Finck #include <stddef.h>
25*c2c66affSColin Finck #include <d3dtypes.h>
26*c2c66affSColin Finck 
27*c2c66affSColin Finck #if defined(__cplusplus)
28*c2c66affSColin Finck extern "C" {
29*c2c66affSColin Finck #endif
30*c2c66affSColin Finck 
31*c2c66affSColin Finck typedef struct _D3DRMVECTOR4D
32*c2c66affSColin Finck {
33*c2c66affSColin Finck     D3DVALUE x;
34*c2c66affSColin Finck     D3DVALUE y;
35*c2c66affSColin Finck     D3DVALUE z;
36*c2c66affSColin Finck     D3DVALUE w;
37*c2c66affSColin Finck } D3DRMVECTOR4D, *LPD3DRMVECTOR4D;
38*c2c66affSColin Finck 
39*c2c66affSColin Finck typedef D3DVALUE D3DRMMATRIX4D[4][4];
40*c2c66affSColin Finck 
41*c2c66affSColin Finck typedef struct _D3DRMQUATERNION {
42*c2c66affSColin Finck     D3DVALUE s;
43*c2c66affSColin Finck     D3DVECTOR v;
44*c2c66affSColin Finck } D3DRMQUATERNION, *LPD3DRMQUATERNION;
45*c2c66affSColin Finck 
46*c2c66affSColin Finck typedef struct _D3DRMRAY {
47*c2c66affSColin Finck     D3DVECTOR dvDir;
48*c2c66affSColin Finck     D3DVECTOR dvPos;
49*c2c66affSColin Finck } D3DRMRAY, *LPD3DRMRAY;
50*c2c66affSColin Finck 
51*c2c66affSColin Finck typedef struct _D3DRMBOX {
52*c2c66affSColin Finck     D3DVECTOR min;
53*c2c66affSColin Finck     D3DVECTOR max;
54*c2c66affSColin Finck } D3DRMBOX, *LPD3DRMBOX;
55*c2c66affSColin Finck 
56*c2c66affSColin Finck typedef void (*D3DRMWRAPCALLBACK)(D3DVECTOR *vec, int *u, int *v, D3DVECTOR *a, D3DVECTOR *b, void *ctx);
57*c2c66affSColin Finck 
58*c2c66affSColin Finck typedef enum _D3DRMLIGHTTYPE {
59*c2c66affSColin Finck     D3DRMLIGHT_AMBIENT,
60*c2c66affSColin Finck     D3DRMLIGHT_POINT,
61*c2c66affSColin Finck     D3DRMLIGHT_SPOT,
62*c2c66affSColin Finck     D3DRMLIGHT_DIRECTIONAL,
63*c2c66affSColin Finck     D3DRMLIGHT_PARALLELPOINT
64*c2c66affSColin Finck } D3DRMLIGHTTYPE, *LPD3DRMLIGHTTYPE;
65*c2c66affSColin Finck 
66*c2c66affSColin Finck typedef enum _D3DRMSHADEMODE {
67*c2c66affSColin Finck     D3DRMSHADE_FLAT     = 0,
68*c2c66affSColin Finck     D3DRMSHADE_GOURAUD  = 1,
69*c2c66affSColin Finck     D3DRMSHADE_PHONG    = 2,
70*c2c66affSColin Finck     D3DRMSHADE_MASK     = 7,
71*c2c66affSColin Finck     D3DRMSHADE_MAX      = 8
72*c2c66affSColin Finck } D3DRMSHADEMODE, *LPD3DRMSHADEMODE;
73*c2c66affSColin Finck 
74*c2c66affSColin Finck typedef enum _D3DRMLIGHTMODE {
75*c2c66affSColin Finck     D3DRMLIGHT_OFF      = 0 * D3DRMSHADE_MAX,
76*c2c66affSColin Finck     D3DRMLIGHT_ON       = 1 * D3DRMSHADE_MAX,
77*c2c66affSColin Finck     D3DRMLIGHT_MASK     = 7 * D3DRMSHADE_MAX,
78*c2c66affSColin Finck     D3DRMLIGHT_MAX      = 8 * D3DRMSHADE_MAX
79*c2c66affSColin Finck } D3DRMLIGHTMODE, *LPD3DRMLIGHTMODE;
80*c2c66affSColin Finck 
81*c2c66affSColin Finck typedef enum _D3DRMFILLMODE {
82*c2c66affSColin Finck     D3DRMFILL_POINTS    = 0 * D3DRMLIGHT_MAX,
83*c2c66affSColin Finck     D3DRMFILL_WIREFRAME	= 1 * D3DRMLIGHT_MAX,
84*c2c66affSColin Finck     D3DRMFILL_SOLID     = 2 * D3DRMLIGHT_MAX,
85*c2c66affSColin Finck     D3DRMFILL_MASK      = 7 * D3DRMLIGHT_MAX,
86*c2c66affSColin Finck     D3DRMFILL_MAX       = 8 * D3DRMLIGHT_MAX
87*c2c66affSColin Finck } D3DRMFILLMODE, *LPD3DRMFILLMODE;
88*c2c66affSColin Finck 
89*c2c66affSColin Finck typedef DWORD D3DRMRENDERQUALITY, *LPD3DRMRENDERQUALITY;
90*c2c66affSColin Finck 
91*c2c66affSColin Finck #define D3DRMRENDER_WIREFRAME   (D3DRMSHADE_FLAT+D3DRMLIGHT_OFF+D3DRMFILL_WIREFRAME)
92*c2c66affSColin Finck #define D3DRMRENDER_UNLITFLAT   (D3DRMSHADE_FLAT+D3DRMLIGHT_OFF+D3DRMFILL_SOLID)
93*c2c66affSColin Finck #define D3DRMRENDER_FLAT        (D3DRMSHADE_FLAT+D3DRMLIGHT_ON+D3DRMFILL_SOLID)
94*c2c66affSColin Finck #define D3DRMRENDER_GOURAUD     (D3DRMSHADE_GOURAUD+D3DRMLIGHT_ON+D3DRMFILL_SOLID)
95*c2c66affSColin Finck #define D3DRMRENDER_PHONG       (D3DRMSHADE_PHONG+D3DRMLIGHT_ON+D3DRMFILL_SOLID)
96*c2c66affSColin Finck 
97*c2c66affSColin Finck #define D3DRMRENDERMODE_BLENDEDTRANSPARENCY       1
98*c2c66affSColin Finck #define D3DRMRENDERMODE_SORTEDTRANSPARENCY        2
99*c2c66affSColin Finck #define D3DRMRENDERMODE_LIGHTINMODELSPACE         8
100*c2c66affSColin Finck #define D3DRMRENDERMODE_VIEWDEPENDENTSPECULAR    16
101*c2c66affSColin Finck #define D3DRMRENDERMODE_DISABLESORTEDALPHAZWRITE 32
102*c2c66affSColin Finck 
103*c2c66affSColin Finck typedef enum _D3DRMTEXTUREQUALITY {
104*c2c66affSColin Finck     D3DRMTEXTURE_NEAREST,
105*c2c66affSColin Finck     D3DRMTEXTURE_LINEAR,
106*c2c66affSColin Finck     D3DRMTEXTURE_MIPNEAREST,
107*c2c66affSColin Finck     D3DRMTEXTURE_MIPLINEAR,
108*c2c66affSColin Finck     D3DRMTEXTURE_LINEARMIPNEAREST,
109*c2c66affSColin Finck     D3DRMTEXTURE_LINEARMIPLINEAR
110*c2c66affSColin Finck } D3DRMTEXTUREQUALITY, *LPD3DRMTEXTUREQUALITY;
111*c2c66affSColin Finck 
112*c2c66affSColin Finck #define D3DRMTEXTURE_FORCERESIDENT          0x00000001
113*c2c66affSColin Finck #define D3DRMTEXTURE_STATIC                 0x00000002
114*c2c66affSColin Finck #define D3DRMTEXTURE_DOWNSAMPLEPOINT        0x00000004
115*c2c66affSColin Finck #define D3DRMTEXTURE_DOWNSAMPLEBILINEAR	    0x00000008
116*c2c66affSColin Finck #define D3DRMTEXTURE_DOWNSAMPLEREDUCEDEPTH  0x00000010
117*c2c66affSColin Finck #define D3DRMTEXTURE_DOWNSAMPLENONE         0x00000020
118*c2c66affSColin Finck #define D3DRMTEXTURE_CHANGEDPIXELS          0x00000040
119*c2c66affSColin Finck #define D3DRMTEXTURE_CHANGEDPALETTE         0x00000080
120*c2c66affSColin Finck #define D3DRMTEXTURE_INVALIDATEONLY         0x00000100
121*c2c66affSColin Finck 
122*c2c66affSColin Finck #define D3DRMSHADOW_TRUEALPHA               0x00000001
123*c2c66affSColin Finck 
124*c2c66affSColin Finck typedef enum _D3DRMCOMBINETYPE {
125*c2c66affSColin Finck     D3DRMCOMBINE_REPLACE,
126*c2c66affSColin Finck     D3DRMCOMBINE_BEFORE,
127*c2c66affSColin Finck     D3DRMCOMBINE_AFTER
128*c2c66affSColin Finck } D3DRMCOMBINETYPE, *LPD3DRMCOMBINETYPE;
129*c2c66affSColin Finck 
130*c2c66affSColin Finck typedef D3DCOLORMODEL D3DRMCOLORMODEL, *LPD3DRMCOLORMODEL;
131*c2c66affSColin Finck 
132*c2c66affSColin Finck typedef enum _D3DRMPALETTEFLAGS
133*c2c66affSColin Finck {
134*c2c66affSColin Finck     D3DRMPALETTE_FREE,
135*c2c66affSColin Finck     D3DRMPALETTE_READONLY,
136*c2c66affSColin Finck     D3DRMPALETTE_RESERVED
137*c2c66affSColin Finck } D3DRMPALETTEFLAGS, *LPD3DRMPALETTEFLAGS;
138*c2c66affSColin Finck 
139*c2c66affSColin Finck typedef struct _D3DRMPALETTEENTRY {
140*c2c66affSColin Finck     unsigned char red;
141*c2c66affSColin Finck     unsigned char green;
142*c2c66affSColin Finck     unsigned char blue;
143*c2c66affSColin Finck     unsigned char flags;
144*c2c66affSColin Finck } D3DRMPALETTEENTRY, *LPD3DRMPALETTEENTRY;
145*c2c66affSColin Finck 
146*c2c66affSColin Finck typedef struct _D3DRMIMAGE {
147*c2c66affSColin Finck     int width;
148*c2c66affSColin Finck     int height;
149*c2c66affSColin Finck     int aspectx;
150*c2c66affSColin Finck     int aspecty;
151*c2c66affSColin Finck     int depth;
152*c2c66affSColin Finck     int rgb;
153*c2c66affSColin Finck     int bytes_per_line;
154*c2c66affSColin Finck     void* buffer1;
155*c2c66affSColin Finck     void* buffer2;
156*c2c66affSColin Finck     ULONG red_mask;
157*c2c66affSColin Finck     ULONG green_mask;
158*c2c66affSColin Finck     ULONG blue_mask;
159*c2c66affSColin Finck     ULONG alpha_mask;
160*c2c66affSColin Finck     int palette_size;
161*c2c66affSColin Finck     D3DRMPALETTEENTRY* palette;
162*c2c66affSColin Finck } D3DRMIMAGE, *LPD3DRMIMAGE;
163*c2c66affSColin Finck 
164*c2c66affSColin Finck typedef enum _D3DRMWRAPTYPE {
165*c2c66affSColin Finck     D3DRMWRAP_FLAT,
166*c2c66affSColin Finck     D3DRMWRAP_CYLINDER,
167*c2c66affSColin Finck     D3DRMWRAP_SPHERE,
168*c2c66affSColin Finck     D3DRMWRAP_CHROME,
169*c2c66affSColin Finck     D3DRMWRAP_SHEET,
170*c2c66affSColin Finck     D3DRMWRAP_BOX
171*c2c66affSColin Finck } D3DRMWRAPTYPE, *LPD3DRMWRAPTYPE;
172*c2c66affSColin Finck 
173*c2c66affSColin Finck #define D3DRMWIREFRAME_CULL             1
174*c2c66affSColin Finck #define D3DRMWIREFRAME_HIDDENLINE       2
175*c2c66affSColin Finck 
176*c2c66affSColin Finck typedef enum _D3DRMPROJECTIONTYPE
177*c2c66affSColin Finck {
178*c2c66affSColin Finck     D3DRMPROJECT_PERSPECTIVE,
179*c2c66affSColin Finck     D3DRMPROJECT_ORTHOGRAPHIC,
180*c2c66affSColin Finck     D3DRMPROJECT_RIGHTHANDPERSPECTIVE,
181*c2c66affSColin Finck     D3DRMPROJECT_RIGHTHANDORTHOGRAPHIC
182*c2c66affSColin Finck } D3DRMPROJECTIONTYPE, *LPD3DRMPROJECTIONTYPE;
183*c2c66affSColin Finck 
184*c2c66affSColin Finck #define D3DRMOPTIONS_LEFTHANDED  0x00000001
185*c2c66affSColin Finck #define D3DRMOPTIONS_RIGHTHANDED 0x00000002
186*c2c66affSColin Finck 
187*c2c66affSColin Finck typedef enum _D3DRMXOFFORMAT {
188*c2c66affSColin Finck     D3DRMXOF_BINARY,
189*c2c66affSColin Finck     D3DRMXOF_COMPRESSED,
190*c2c66affSColin Finck     D3DRMXOF_TEXT
191*c2c66affSColin Finck } D3DRMXOFFORMAT, *LPD3DRMXOFFORMAT;
192*c2c66affSColin Finck 
193*c2c66affSColin Finck typedef DWORD D3DRMSAVEOPTIONS;
194*c2c66affSColin Finck #define D3DRMXOFSAVE_NORMALS             1
195*c2c66affSColin Finck #define D3DRMXOFSAVE_TEXTURECOORDINATES  2
196*c2c66affSColin Finck #define D3DRMXOFSAVE_MATERIALS           4
197*c2c66affSColin Finck #define D3DRMXOFSAVE_TEXTURENAMES        8
198*c2c66affSColin Finck #define D3DRMXOFSAVE_ALL                15
199*c2c66affSColin Finck #define D3DRMXOFSAVE_TEMPLATES          16
200*c2c66affSColin Finck #define D3DRMXOFSAVE_TEXTURETOPOLOGY    32
201*c2c66affSColin Finck 
202*c2c66affSColin Finck typedef enum _D3DRMCOLORSOURCE {
203*c2c66affSColin Finck     D3DRMCOLOR_FROMFACE,
204*c2c66affSColin Finck     D3DRMCOLOR_FROMVERTEX
205*c2c66affSColin Finck } D3DRMCOLORSOURCE, *LPD3DRMCOLORSOURCE;
206*c2c66affSColin Finck 
207*c2c66affSColin Finck typedef enum _D3DRMFRAMECONSTRAINT {
208*c2c66affSColin Finck     D3DRMCONSTRAIN_Z,
209*c2c66affSColin Finck     D3DRMCONSTRAIN_Y,
210*c2c66affSColin Finck     D3DRMCONSTRAIN_X
211*c2c66affSColin Finck } D3DRMFRAMECONSTRAINT, *LPD3DRMFRAMECONSTRAINT;
212*c2c66affSColin Finck 
213*c2c66affSColin Finck typedef enum _D3DRMMATERIALMODE {
214*c2c66affSColin Finck     D3DRMMATERIAL_FROMMESH,
215*c2c66affSColin Finck     D3DRMMATERIAL_FROMPARENT,
216*c2c66affSColin Finck     D3DRMMATERIAL_FROMFRAME
217*c2c66affSColin Finck } D3DRMMATERIALMODE, *LPD3DRMMATERIALMODE;
218*c2c66affSColin Finck 
219*c2c66affSColin Finck typedef enum _D3DRMFOGMODE {
220*c2c66affSColin Finck     D3DRMFOG_LINEAR,
221*c2c66affSColin Finck     D3DRMFOG_EXPONENTIAL,
222*c2c66affSColin Finck     D3DRMFOG_EXPONENTIALSQUARED
223*c2c66affSColin Finck } D3DRMFOGMODE, *LPD3DRMFOGMODE;
224*c2c66affSColin Finck 
225*c2c66affSColin Finck typedef enum _D3DRMZBUFFERMODE {
226*c2c66affSColin Finck     D3DRMZBUFFER_FROMPARENT,
227*c2c66affSColin Finck     D3DRMZBUFFER_ENABLE,
228*c2c66affSColin Finck     D3DRMZBUFFER_DISABLE
229*c2c66affSColin Finck } D3DRMZBUFFERMODE, *LPD3DRMZBUFFERMODE;
230*c2c66affSColin Finck 
231*c2c66affSColin Finck typedef enum _D3DRMSORTMODE {
232*c2c66affSColin Finck     D3DRMSORT_FROMPARENT,
233*c2c66affSColin Finck     D3DRMSORT_NONE,
234*c2c66affSColin Finck     D3DRMSORT_FRONTTOBACK,
235*c2c66affSColin Finck     D3DRMSORT_BACKTOFRONT
236*c2c66affSColin Finck } D3DRMSORTMODE, *LPD3DRMSORTMODE;
237*c2c66affSColin Finck 
238*c2c66affSColin Finck typedef struct _D3DRMMATERIALOVERRIDE {
239*c2c66affSColin Finck     DWORD         dwSize;
240*c2c66affSColin Finck     DWORD         dwFlags;
241*c2c66affSColin Finck     D3DCOLORVALUE dcDiffuse;
242*c2c66affSColin Finck     D3DCOLORVALUE dcAmbient;
243*c2c66affSColin Finck     D3DCOLORVALUE dcEmissive;
244*c2c66affSColin Finck     D3DCOLORVALUE dcSpecular;
245*c2c66affSColin Finck     D3DVALUE      dvPower;
246*c2c66affSColin Finck     IUnknown *lpD3DRMTex;
247*c2c66affSColin Finck } D3DRMMATERIALOVERRIDE, *LPD3DRMMATERIALOVERRIDE;
248*c2c66affSColin Finck 
249*c2c66affSColin Finck #define D3DRMMATERIALOVERRIDE_DIFFUSE_ALPHAONLY     0x00000001
250*c2c66affSColin Finck #define D3DRMMATERIALOVERRIDE_DIFFUSE_RGBONLY       0x00000002
251*c2c66affSColin Finck #define D3DRMMATERIALOVERRIDE_DIFFUSE               0x00000003
252*c2c66affSColin Finck #define D3DRMMATERIALOVERRIDE_AMBIENT               0x00000004
253*c2c66affSColin Finck #define D3DRMMATERIALOVERRIDE_EMISSIVE              0x00000008
254*c2c66affSColin Finck #define D3DRMMATERIALOVERRIDE_SPECULAR              0x00000010
255*c2c66affSColin Finck #define D3DRMMATERIALOVERRIDE_POWER                 0x00000020
256*c2c66affSColin Finck #define D3DRMMATERIALOVERRIDE_TEXTURE               0x00000040
257*c2c66affSColin Finck #define D3DRMMATERIALOVERRIDE_DIFFUSE_ALPHAMULTIPLY 0x00000080
258*c2c66affSColin Finck #define D3DRMMATERIALOVERRIDE_ALL                   0x000000FF
259*c2c66affSColin Finck 
260*c2c66affSColin Finck #define D3DRMFPTF_ALPHA                             0x00000001
261*c2c66affSColin Finck #define D3DRMFPTF_NOALPHA                           0x00000002
262*c2c66affSColin Finck #define D3DRMFPTF_PALETTIZED                        0x00000004
263*c2c66affSColin Finck #define D3DRMFPTF_NOTPALETTIZED                     0x00000008
264*c2c66affSColin Finck 
265*c2c66affSColin Finck #define D3DRMSTATECHANGE_UPDATEONLY                0x000000001
266*c2c66affSColin Finck #define D3DRMSTATECHANGE_VOLATILE                  0x000000002
267*c2c66affSColin Finck #define D3DRMSTATECHANGE_NONVOLATILE               0x000000004
268*c2c66affSColin Finck #define D3DRMSTATECHANGE_RENDER                    0x000000020
269*c2c66affSColin Finck #define D3DRMSTATECHANGE_LIGHT                     0x000000040
270*c2c66affSColin Finck 
271*c2c66affSColin Finck #define D3DRMDEVICE_NOZBUFFER           0x00000001
272*c2c66affSColin Finck 
273*c2c66affSColin Finck #define D3DRMCALLBACK_PREORDER		0
274*c2c66affSColin Finck #define D3DRMCALLBACK_POSTORDER		1
275*c2c66affSColin Finck 
276*c2c66affSColin Finck #define D3DRMRAYPICK_ONLYBOUNDINGBOXES          0x01
277*c2c66affSColin Finck #define D3DRMRAYPICK_IGNOREFURTHERPRIMITIVES    0x02
278*c2c66affSColin Finck #define D3DRMRAYPICK_INTERPOLATEUV              0x04
279*c2c66affSColin Finck #define D3DRMRAYPICK_INTERPOLATECOLOR           0x08
280*c2c66affSColin Finck #define D3DRMRAYPICK_INTERPOLATENORMAL          0x10
281*c2c66affSColin Finck 
282*c2c66affSColin Finck #define D3DRMADDFACES_VERTICESONLY              1
283*c2c66affSColin Finck 
284*c2c66affSColin Finck #define D3DRMGENERATENORMALS_PRECOMPACT         1
285*c2c66affSColin Finck #define D3DRMGENERATENORMALS_USECREASEANGLE     2
286*c2c66affSColin Finck 
287*c2c66affSColin Finck #define D3DRMMESHBUILDER_DIRECTPARENT           1
288*c2c66affSColin Finck #define D3DRMMESHBUILDER_ROOTMESH               2
289*c2c66affSColin Finck 
290*c2c66affSColin Finck #define D3DRMMESHBUILDER_RENDERENABLE   0x00000001
291*c2c66affSColin Finck #define D3DRMMESHBUILDER_PICKENABLE     0x00000002
292*c2c66affSColin Finck 
293*c2c66affSColin Finck #define D3DRMADDMESHBUILDER_DONTCOPYAPPDATA     1
294*c2c66affSColin Finck #define D3DRMADDMESHBUILDER_FLATTENSUBMESHES    2
295*c2c66affSColin Finck #define D3DRMADDMESHBUILDER_NOSUBMESHES         4
296*c2c66affSColin Finck 
297*c2c66affSColin Finck #define D3DRMMESHBUILDERAGE_GEOMETRY    0x00000001
298*c2c66affSColin Finck #define D3DRMMESHBUILDERAGE_MATERIALS   0x00000002
299*c2c66affSColin Finck #define D3DRMMESHBUILDERAGE_TEXTURES    0x00000004
300*c2c66affSColin Finck 
301*c2c66affSColin Finck #define D3DRMFVF_TYPE                   0x00000001
302*c2c66affSColin Finck #define D3DRMFVF_NORMAL                 0x00000002
303*c2c66affSColin Finck #define D3DRMFVF_COLOR                  0x00000004
304*c2c66affSColin Finck #define D3DRMFVF_TEXTURECOORDS          0x00000008
305*c2c66affSColin Finck 
306*c2c66affSColin Finck #define D3DRMVERTEX_STRIP               0x00000001
307*c2c66affSColin Finck #define D3DRMVERTEX_FAN                 0x00000002
308*c2c66affSColin Finck #define D3DRMVERTEX_LIST                0x00000004
309*c2c66affSColin Finck 
310*c2c66affSColin Finck #define D3DRMCLEAR_TARGET               0x00000001
311*c2c66affSColin Finck #define D3DRMCLEAR_ZBUFFER              0x00000002
312*c2c66affSColin Finck #define D3DRMCLEAR_DIRTYRECTS           0x00000004
313*c2c66affSColin Finck #define D3DRMCLEAR_ALL                  (D3DRMCLEAR_TARGET | D3DRMCLEAR_ZBUFFER | D3DRMCLEAR_DIRTYRECTS)
314*c2c66affSColin Finck 
315*c2c66affSColin Finck #define D3DRMFOGMETHOD_VERTEX           0x00000001
316*c2c66affSColin Finck #define D3DRMFOGMETHOD_TABLE            0x00000002
317*c2c66affSColin Finck #define D3DRMFOGMETHOD_ANY              0x00000004
318*c2c66affSColin Finck 
319*c2c66affSColin Finck #define D3DRMFRAME_RENDERENABLE         0x00000001
320*c2c66affSColin Finck #define D3DRMFRAME_PICKENABLE           0x00000002
321*c2c66affSColin Finck 
322*c2c66affSColin Finck typedef DWORD D3DRMANIMATIONOPTIONS;
323*c2c66affSColin Finck #define D3DRMANIMATION_OPEN             0x00000001
324*c2c66affSColin Finck #define D3DRMANIMATION_CLOSED           0x00000002
325*c2c66affSColin Finck #define D3DRMANIMATION_LINEARPOSITION   0x00000004
326*c2c66affSColin Finck #define D3DRMANIMATION_SPLINEPOSITION   0x00000008
327*c2c66affSColin Finck #define D3DRMANIMATION_SCALEANDROTATION 0x00000010
328*c2c66affSColin Finck #define D3DRMANIMATION_POSITION         0x00000020
329*c2c66affSColin Finck 
330*c2c66affSColin Finck typedef DWORD D3DRMINTERPOLATIONOPTIONS;
331*c2c66affSColin Finck #define D3DRMINTERPOLATION_OPEN         0x0001
332*c2c66affSColin Finck #define D3DRMINTERPOLATION_CLOSED       0x0002
333*c2c66affSColin Finck #define D3DRMINTERPOLATION_NEAREST      0x0100
334*c2c66affSColin Finck #define D3DRMINTERPOLATION_LINEAR       0x0004
335*c2c66affSColin Finck #define D3DRMINTERPOLATION_SPLINE       0x0008
336*c2c66affSColin Finck #define D3DRMINTERPOLATION_VERTEXCOLOR  0x0040
337*c2c66affSColin Finck #define D3DRMINTERPOLATION_SLERPNORMALS 0x0080
338*c2c66affSColin Finck 
339*c2c66affSColin Finck typedef DWORD D3DRMLOADOPTIONS;
340*c2c66affSColin Finck 
341*c2c66affSColin Finck #define D3DRMLOAD_FROMFILE             0x000L
342*c2c66affSColin Finck #define D3DRMLOAD_FROMRESOURCE         0x001L
343*c2c66affSColin Finck #define D3DRMLOAD_FROMMEMORY           0x002L
344*c2c66affSColin Finck #define D3DRMLOAD_FROMSTREAM           0x004L
345*c2c66affSColin Finck #define D3DRMLOAD_FROMURL              0x008L
346*c2c66affSColin Finck 
347*c2c66affSColin Finck #define D3DRMLOAD_BYNAME               0x010L
348*c2c66affSColin Finck #define D3DRMLOAD_BYPOSITION           0x020L
349*c2c66affSColin Finck #define D3DRMLOAD_BYGUID               0x040L
350*c2c66affSColin Finck #define D3DRMLOAD_FIRST                0x080L
351*c2c66affSColin Finck 
352*c2c66affSColin Finck #define D3DRMLOAD_INSTANCEBYREFERENCE  0x100L
353*c2c66affSColin Finck #define D3DRMLOAD_INSTANCEBYCOPYING    0x200L
354*c2c66affSColin Finck 
355*c2c66affSColin Finck #define D3DRMLOAD_ASYNCHRONOUS         0x400L
356*c2c66affSColin Finck 
357*c2c66affSColin Finck typedef struct _D3DRMLOADRESOURCE
358*c2c66affSColin Finck {
359*c2c66affSColin Finck     HMODULE hModule;
360*c2c66affSColin Finck     const char *lpName;
361*c2c66affSColin Finck     const char *lpType;
362*c2c66affSColin Finck } D3DRMLOADRESOURCE, *LPD3DRMLOADRESOURCE;
363*c2c66affSColin Finck 
364*c2c66affSColin Finck typedef struct _D3DRMLOADMEMORY
365*c2c66affSColin Finck {
366*c2c66affSColin Finck     void *lpMemory;
367*c2c66affSColin Finck     DWORD dSize;
368*c2c66affSColin Finck } D3DRMLOADMEMORY, *LPD3DRMLOADMEMORY;
369*c2c66affSColin Finck 
370*c2c66affSColin Finck #define D3DRMPMESHSTATUS_VALID            0x01
371*c2c66affSColin Finck #define D3DRMPMESHSTATUS_INTERRUPTED      0x02
372*c2c66affSColin Finck #define D3DRMPMESHSTATUS_BASEMESHCOMPLETE 0x04
373*c2c66affSColin Finck #define D3DRMPMESHSTATUS_COMPLETE         0x08
374*c2c66affSColin Finck #define D3DRMPMESHSTATUS_RENDERABLE       0x10
375*c2c66affSColin Finck 
376*c2c66affSColin Finck #define D3DRMPMESHEVENT_BASEMESH          0x01
377*c2c66affSColin Finck #define D3DRMPMESHEVENT_COMPLETE          0x02
378*c2c66affSColin Finck 
379*c2c66affSColin Finck typedef struct _D3DRMPMESHLOADSTATUS {
380*c2c66affSColin Finck     DWORD dwSize;
381*c2c66affSColin Finck     DWORD dwPMeshSize;
382*c2c66affSColin Finck     DWORD dwBaseMeshSize;
383*c2c66affSColin Finck     DWORD dwBytesLoaded;
384*c2c66affSColin Finck     DWORD dwVerticesLoaded;
385*c2c66affSColin Finck     DWORD dwFacesLoaded;
386*c2c66affSColin Finck     HRESULT dwLoadResult;
387*c2c66affSColin Finck     DWORD dwFlags;
388*c2c66affSColin Finck } D3DRMPMESHLOADSTATUS, *LPD3DRMPMESHLOADSTATUS;
389*c2c66affSColin Finck 
390*c2c66affSColin Finck typedef enum _D3DRMUSERVISUALREASON {
391*c2c66affSColin Finck     D3DRMUSERVISUAL_CANSEE,
392*c2c66affSColin Finck     D3DRMUSERVISUAL_RENDER
393*c2c66affSColin Finck } D3DRMUSERVISUALREASON, *LPD3DRMUSERVISUALREASON;
394*c2c66affSColin Finck 
395*c2c66affSColin Finck typedef struct _D3DRMANIMATIONKEY
396*c2c66affSColin Finck {
397*c2c66affSColin Finck     DWORD dwSize;
398*c2c66affSColin Finck     DWORD dwKeyType;
399*c2c66affSColin Finck     D3DVALUE dvTime;
400*c2c66affSColin Finck     DWORD dwID;
401*c2c66affSColin Finck #if !defined(__cplusplus) || !defined(D3D_OVERLOADS)
402*c2c66affSColin Finck     union
403*c2c66affSColin Finck     {
404*c2c66affSColin Finck 	D3DRMQUATERNION dqRotateKey;
405*c2c66affSColin Finck 	D3DVECTOR dvScaleKey;
406*c2c66affSColin Finck 	D3DVECTOR dvPositionKey;
407*c2c66affSColin Finck     } DUMMYUNIONNAME;
408*c2c66affSColin Finck #else
409*c2c66affSColin Finck     D3DVALUE dvK[4];
410*c2c66affSColin Finck #endif
411*c2c66affSColin Finck } D3DRMANIMATIONKEY;
412*c2c66affSColin Finck typedef D3DRMANIMATIONKEY *LPD3DRMANIMATIONKEY;
413*c2c66affSColin Finck 
414*c2c66affSColin Finck #define D3DRMANIMATION_ROTATEKEY   0x01
415*c2c66affSColin Finck #define D3DRMANIMATION_SCALEKEY    0x02
416*c2c66affSColin Finck #define D3DRMANIMATION_POSITIONKEY 0x03
417*c2c66affSColin Finck 
418*c2c66affSColin Finck typedef DWORD D3DRMMAPPING, D3DRMMAPPINGFLAG, *LPD3DRMMAPPING;
419*c2c66affSColin Finck static const D3DRMMAPPINGFLAG D3DRMMAP_WRAPU        = 1;
420*c2c66affSColin Finck static const D3DRMMAPPINGFLAG D3DRMMAP_WRAPV        = 2;
421*c2c66affSColin Finck static const D3DRMMAPPINGFLAG D3DRMMAP_PERSPCORRECT = 4;
422*c2c66affSColin Finck 
423*c2c66affSColin Finck typedef struct _D3DRMVERTEX {
424*c2c66affSColin Finck     D3DVECTOR position;
425*c2c66affSColin Finck     D3DVECTOR normal;
426*c2c66affSColin Finck     D3DVALUE  tu;
427*c2c66affSColin Finck     D3DVALUE  tv;
428*c2c66affSColin Finck     D3DCOLOR  color;
429*c2c66affSColin Finck } D3DRMVERTEX, *LPD3DRMVERTEX;
430*c2c66affSColin Finck 
431*c2c66affSColin Finck typedef LONG D3DRMGROUPINDEX;
432*c2c66affSColin Finck static const D3DRMGROUPINDEX D3DRMGROUP_ALLGROUPS = -1;
433*c2c66affSColin Finck 
434*c2c66affSColin Finck void WINAPI D3DRMMatrixFromQuaternion(D3DRMMATRIX4D m, D3DRMQUATERNION *q);
435*c2c66affSColin Finck 
436*c2c66affSColin Finck D3DRMQUATERNION * WINAPI D3DRMQuaternionFromRotation(D3DRMQUATERNION *x, D3DVECTOR *axis, D3DVALUE theta);
437*c2c66affSColin Finck D3DRMQUATERNION * WINAPI D3DRMQuaternionMultiply(D3DRMQUATERNION *ret, D3DRMQUATERNION *x, D3DRMQUATERNION *y);
438*c2c66affSColin Finck D3DRMQUATERNION * WINAPI D3DRMQuaternionSlerp(D3DRMQUATERNION *ret,
439*c2c66affSColin Finck         D3DRMQUATERNION *x, D3DRMQUATERNION *y, D3DVALUE alpha);
440*c2c66affSColin Finck 
441*c2c66affSColin Finck D3DVECTOR * WINAPI D3DRMVectorAdd(D3DVECTOR *ret, D3DVECTOR *x, D3DVECTOR *y);
442*c2c66affSColin Finck D3DVECTOR * WINAPI D3DRMVectorCrossProduct(D3DVECTOR *ret, D3DVECTOR *x, D3DVECTOR *y);
443*c2c66affSColin Finck D3DVALUE WINAPI D3DRMVectorDotProduct(D3DVECTOR *x, D3DVECTOR *y);
444*c2c66affSColin Finck D3DVECTOR * WINAPI D3DRMVectorNormalize(D3DVECTOR *x);
445*c2c66affSColin Finck 
446*c2c66affSColin Finck #define D3DRMVectorNormalise D3DRMVectorNormalize
447*c2c66affSColin Finck 
448*c2c66affSColin Finck D3DVALUE WINAPI D3DRMVectorModulus(D3DVECTOR *x);
449*c2c66affSColin Finck D3DVECTOR * WINAPI D3DRMVectorRandom(D3DVECTOR *ret);
450*c2c66affSColin Finck D3DVECTOR * WINAPI D3DRMVectorRotate(D3DVECTOR *ret, D3DVECTOR *x, D3DVECTOR *axis, D3DVALUE theta);
451*c2c66affSColin Finck D3DVECTOR * WINAPI D3DRMVectorReflect(D3DVECTOR *ret, D3DVECTOR *ray, D3DVECTOR *normal);
452*c2c66affSColin Finck D3DVECTOR * WINAPI D3DRMVectorScale(D3DVECTOR *ret, D3DVECTOR *x, D3DVALUE scale);
453*c2c66affSColin Finck D3DVECTOR * WINAPI D3DRMVectorSubtract(D3DVECTOR *ret, D3DVECTOR *x, D3DVECTOR *y);
454*c2c66affSColin Finck 
455*c2c66affSColin Finck D3DCOLOR WINAPI D3DRMCreateColorRGB(D3DVALUE, D3DVALUE, D3DVALUE);
456*c2c66affSColin Finck D3DCOLOR WINAPI D3DRMCreateColorRGBA(D3DVALUE, D3DVALUE, D3DVALUE, D3DVALUE);
457*c2c66affSColin Finck D3DVALUE WINAPI D3DRMColorGetAlpha(D3DCOLOR);
458*c2c66affSColin Finck D3DVALUE WINAPI D3DRMColorGetBlue(D3DCOLOR);
459*c2c66affSColin Finck D3DVALUE WINAPI D3DRMColorGetGreen(D3DCOLOR);
460*c2c66affSColin Finck D3DVALUE WINAPI D3DRMColorGetRed(D3DCOLOR);
461*c2c66affSColin Finck 
462*c2c66affSColin Finck #if defined(__cplusplus)
463*c2c66affSColin Finck }
464*c2c66affSColin Finck #endif
465*c2c66affSColin Finck 
466*c2c66affSColin Finck #endif
467