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 #define D3DRMLOAD_FROMFILE 0x000L
181 #define D3DRMLOAD_FROMRESOURCE 0x001L
182 #define D3DRMLOAD_FROMMEMORY 0x002L
183 #define D3DRMLOAD_FROMSTREAM 0x004L
184 #define D3DRMLOAD_FROMURL 0x008L
186 #define D3DRMLOAD_BYNAME 0x010L
187 #define D3DRMLOAD_BYPOSITION 0x020L
188 #define D3DRMLOAD_BYGUID 0x040L
189 #define D3DRMLOAD_FIRST 0x080L
191 #define D3DRMLOAD_INSTANCEBYREFERENCE 0x100L
192 #define D3DRMLOAD_INSTANCEBYCOPYING 0x200L
194 #define D3DRMLOAD_ASYNCHRONOUS 0x400L
196 typedef struct _D3DRMLOADRESOURCE {
198 LPCSTR /*LPCTSTR*/ lpName;
199 LPCSTR /*LPCTSTR*/ lpType;
200 } D3DRMLOADRESOURCE, *LPD3DRMLOADRESOURCE;
202 typedef struct _D3DRMLOADMEMORY {
205 } D3DRMLOADMEMORY, *LPD3DRMLOADMEMORY;
207 typedef struct _D3DRMPMESHLOADSTATUS {
210 DWORD dwBaseMeshSize;
212 DWORD dwVerticesLoaded;
214 HRESULT dwLoadResult;
216 } D3DRMPMESHLOADSTATUS, *LPD3DRMPMESHLOADSTATUS;
218 typedef enum _D3DRMUSERVISUALREASON {
219 D3DRMUSERVISUAL_CANSEE,
220 D3DRMUSERVISUAL_RENDER
221 } D3DRMUSERVISUALREASON, *LPD3DRMUSERVISUALREASON;
223 typedef DWORD D3DRMMAPPING;
225 typedef struct _D3DRMVERTEX {
231 } D3DRMVERTEX, *LPD3DRMVERTEX;
233 typedef LONG D3DRMGROUPINDEX;
235 void WINAPI D3DRMMatrixFromQuaternion(D3DRMMATRIX4D, LPD3DRMQUATERNION);
237 LPD3DRMQUATERNION WINAPI D3DRMQuaternionFromRotation(LPD3DRMQUATERNION ,LPD3DVECTOR,D3DVALUE);
238 LPD3DRMQUATERNION WINAPI D3DRMQuaternionMultiply(LPD3DRMQUATERNION, LPD3DRMQUATERNION, LPD3DRMQUATERNION);
239 LPD3DRMQUATERNION WINAPI D3DRMQuaternionSlerp(LPD3DRMQUATERNION, LPD3DRMQUATERNION, LPD3DRMQUATERNION, D3DVALUE);
241 LPD3DVECTOR WINAPI D3DRMVectorAdd(LPD3DVECTOR, LPD3DVECTOR, LPD3DVECTOR);
242 LPD3DVECTOR WINAPI D3DRMVectorCrossProduct(LPD3DVECTOR, LPD3DVECTOR, LPD3DVECTOR);
243 D3DVALUE WINAPI D3DRMVectorDotProduct(LPD3DVECTOR, LPD3DVECTOR);
244 LPD3DVECTOR WINAPI D3DRMVectorNormalize(LPD3DVECTOR);
246 #define D3DRMVectorNormalise D3DRMVectorNormalize
248 D3DVALUE WINAPI D3DRMVectorModulus(LPD3DVECTOR);
249 LPD3DVECTOR WINAPI D3DRMVectorRandom(LPD3DVECTOR);
250 LPD3DVECTOR WINAPI D3DRMVectorRotate(LPD3DVECTOR, LPD3DVECTOR, LPD3DVECTOR, D3DVALUE);
251 LPD3DVECTOR WINAPI D3DRMVectorReflect(LPD3DVECTOR, LPD3DVECTOR, LPD3DVECTOR);
252 LPD3DVECTOR WINAPI D3DRMVectorScale(LPD3DVECTOR, LPD3DVECTOR, D3DVALUE);
253 LPD3DVECTOR WINAPI D3DRMVectorSubtract(LPD3DVECTOR, LPD3DVECTOR, LPD3DVECTOR);
255 D3DCOLOR WINAPI D3DRMCreateColorRGB(D3DVALUE, D3DVALUE, D3DVALUE);
256 D3DCOLOR WINAPI D3DRMCreateColorRGBA(D3DVALUE, D3DVALUE, D3DVALUE, D3DVALUE);
257 D3DVALUE WINAPI D3DRMColorGetAlpha(D3DCOLOR);
258 D3DVALUE WINAPI D3DRMColorGetBlue(D3DCOLOR);
259 D3DVALUE WINAPI D3DRMColorGetGreen(D3DCOLOR);
260 D3DVALUE WINAPI D3DRMColorGetRed(D3DCOLOR);
262 #if defined(__cplusplus)