2 * Copyright 2007 Vijay Kiran Kamuju
3 * Copyright 2007 David ADAM
4 * Copyright 2010 Christian Costa
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __D3DRMDEFS_H__
22 #define __D3DRMDEFS_H__
27 #if defined(__cplusplus)
31 typedef struct _D3DRMVECTOR4D
37 } D3DRMVECTOR4D, *LPD3DRMVECTOR4D;
39 typedef D3DVALUE D3DRMMATRIX4D[4][4];
41 typedef struct _D3DRMQUATERNION {
44 } D3DRMQUATERNION, *LPD3DRMQUATERNION;
46 typedef struct _D3DRMRAY {
49 } D3DRMRAY, *LPD3DRMRAY;
51 typedef struct _D3DRMBOX {
54 } D3DRMBOX, *LPD3DRMBOX;
56 typedef enum _D3DRMLIGHTTYPE {
60 D3DRMLIGHT_DIRECTIONAL,
61 D3DRMLIGHT_PARALLELPOINT
62 } D3DRMLIGHTTYPE, *LPD3DRMLIGHTTYPE;
64 typedef DWORD D3DRMRENDERQUALITY, *LPD3DRMRENDERQUALITY;
66 typedef enum _D3DRMTEXTUREQUALITY {
69 D3DRMTEXTURE_MIPNEAREST,
70 D3DRMTEXTURE_MIPLINEAR,
71 D3DRMTEXTURE_LINEARMIPNEAREST,
72 D3DRMTEXTURE_LINEARMIPLINEAR
73 } D3DRMTEXTUREQUALITY, *LPD3DRMTEXTUREQUALITY;
75 typedef enum _D3DRMCOMBINETYPE {
79 } D3DRMCOMBINETYPE, *LPD3DRMCOMBINETYPE;
81 typedef struct _D3DRMPALETTEENTRY {
86 } D3DRMPALETTEENTRY, *LPD3DRMPALETTEENTRY;
88 typedef struct _D3DRMIMAGE {
98 unsigned long red_mask;
99 unsigned long green_mask;
100 unsigned long blue_mask;
101 unsigned long alpha_mask;
103 D3DRMPALETTEENTRY* palette;
104 } D3DRMIMAGE, *LPD3DRMIMAGE;
106 typedef enum _D3DRMWRAPTYPE {
113 } D3DRMWRAPTYPE, *LPD3DRMWRAPTYPE;
115 typedef enum _D3DRMPROJECTIONTYPE
117 D3DRMPROJECT_PERSPECTIVE,
118 D3DRMPROJECT_ORTHOGRAPHIC,
119 D3DRMPROJECT_RIGHTHANDPERSPECTIVE,
120 D3DRMPROJECT_RIGHTHANDORTHOGRAPHIC
121 } D3DRMPROJECTIONTYPE, *LPD3DRMPROJECTIONTYPE;
123 typedef enum _D3DRMXOFFORMAT {
127 } D3DRMXOFFORMAT, *LPD3DRMXOFFORMAT;
129 typedef DWORD D3DRMSAVEOPTIONS;
131 typedef enum _D3DRMCOLORSOURCE {
133 D3DRMCOLOR_FROMVERTEX
134 } D3DRMCOLORSOURCE, *LPD3DRMCOLORSOURCE;
136 typedef enum _D3DRMFRAMECONSTRAINT {
140 } D3DRMFRAMECONSTRAINT, *LPD3DRMFRAMECONSTRAINT;
142 typedef enum _D3DRMMATERIALMODE {
143 D3DRMMATERIAL_FROMMESH,
144 D3DRMMATERIAL_FROMPARENT,
145 D3DRMMATERIAL_FROMFRAME
146 } D3DRMMATERIALMODE, *LPD3DRMMATERIALMODE;
148 typedef enum _D3DRMFOGMODE {
150 D3DRMFOG_EXPONENTIAL,
151 D3DRMFOG_EXPONENTIALSQUARED
152 } D3DRMFOGMODE, *LPD3DRMFOGMODE;
154 typedef enum _D3DRMZBUFFERMODE {
155 D3DRMZBUFFER_FROMPARENT,
158 } D3DRMZBUFFERMODE, *LPD3DRMZBUFFERMODE;
160 typedef enum _D3DRMSORTMODE {
161 D3DRMSORT_FROMPARENT,
163 D3DRMSORT_FRONTTOBACK,
164 D3DRMSORT_BACKTOFRONT
165 } D3DRMSORTMODE, *LPD3DRMSORTMODE;
167 typedef struct _D3DRMMATERIALOVERRIDE {
170 D3DCOLORVALUE dcDiffuse;
171 D3DCOLORVALUE dcAmbient;
172 D3DCOLORVALUE dcEmissive;
173 D3DCOLORVALUE dcSpecular;
175 LPUNKNOWN lpD3DRMTex;
176 } D3DRMMATERIALOVERRIDE, *LPD3DRMMATERIALOVERRIDE;
178 typedef DWORD D3DRMLOADOPTIONS;
180 typedef struct _D3DRMPMESHLOADSTATUS {
183 DWORD dwBaseMeshSize;
185 DWORD dwVerticesLoaded;
187 HRESULT dwLoadResult;
189 } D3DRMPMESHLOADSTATUS, *LPD3DRMPMESHLOADSTATUS;
191 typedef enum _D3DRMUSERVISUALREASON {
192 D3DRMUSERVISUAL_CANSEE,
193 D3DRMUSERVISUAL_RENDER
194 } D3DRMUSERVISUALREASON, *LPD3DRMUSERVISUALREASON;
196 typedef DWORD D3DRMMAPPING;
198 typedef struct _D3DRMVERTEX {
204 } D3DRMVERTEX, *LPD3DRMVERTEX;
206 typedef LONG D3DRMGROUPINDEX;
208 void WINAPI D3DRMMatrixFromQuaternion(D3DRMMATRIX4D, LPD3DRMQUATERNION);
210 LPD3DRMQUATERNION WINAPI D3DRMQuaternionFromRotation(LPD3DRMQUATERNION ,LPD3DVECTOR,D3DVALUE);
211 LPD3DRMQUATERNION WINAPI D3DRMQuaternionMultiply(LPD3DRMQUATERNION, LPD3DRMQUATERNION, LPD3DRMQUATERNION);
212 LPD3DRMQUATERNION WINAPI D3DRMQuaternionSlerp(LPD3DRMQUATERNION, LPD3DRMQUATERNION, LPD3DRMQUATERNION, D3DVALUE);
214 LPD3DVECTOR WINAPI D3DRMVectorAdd(LPD3DVECTOR, LPD3DVECTOR, LPD3DVECTOR);
215 LPD3DVECTOR WINAPI D3DRMVectorCrossProduct(LPD3DVECTOR, LPD3DVECTOR, LPD3DVECTOR);
216 D3DVALUE WINAPI D3DRMVectorDotProduct(LPD3DVECTOR, LPD3DVECTOR);
217 LPD3DVECTOR WINAPI D3DRMVectorNormalize(LPD3DVECTOR);
219 #define D3DRMVectorNormalise D3DRMVectorNormalize
221 D3DVALUE WINAPI D3DRMVectorModulus(LPD3DVECTOR);
222 LPD3DVECTOR WINAPI D3DRMVectorRandom(LPD3DVECTOR);
223 LPD3DVECTOR WINAPI D3DRMVectorRotate(LPD3DVECTOR, LPD3DVECTOR, LPD3DVECTOR, D3DVALUE);
224 LPD3DVECTOR WINAPI D3DRMVectorReflect(LPD3DVECTOR, LPD3DVECTOR, LPD3DVECTOR);
225 LPD3DVECTOR WINAPI D3DRMVectorScale(LPD3DVECTOR, LPD3DVECTOR, D3DVALUE);
226 LPD3DVECTOR WINAPI D3DRMVectorSubtract(LPD3DVECTOR, LPD3DVECTOR, LPD3DVECTOR);
228 D3DCOLOR WINAPI D3DRMCreateColorRGB(D3DVALUE, D3DVALUE, D3DVALUE);
229 D3DCOLOR WINAPI D3DRMCreateColorRGBA(D3DVALUE, D3DVALUE, D3DVALUE, D3DVALUE);
230 D3DVALUE WINAPI D3DRMColorGetAlpha(D3DCOLOR);
231 D3DVALUE WINAPI D3DRMColorGetBlue(D3DCOLOR);
232 D3DVALUE WINAPI D3DRMColorGetGreen(D3DCOLOR);
233 D3DVALUE WINAPI D3DRMColorGetRed(D3DCOLOR);
235 #if defined(__cplusplus)