/[cvs]/api/include/d3dx8tex.h
ViewVC logotype

Annotation of /api/include/d3dx8tex.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Sun Jul 1 20:47:59 2001 UTC (22 years, 10 months ago) by bearsoft
Branch point for: lazy, MAIN
File MIME type: text/plain
Initial revision

1 bearsoft 1.1 ///////////////////////////////////////////////////////////////////////////
2     //
3     // Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
4     //
5     // File: d3dx8tex.h
6     // Content: D3DX texturing APIs
7     //
8     ///////////////////////////////////////////////////////////////////////////
9    
10     #include "d3dx8.h"
11    
12     #ifndef __D3DX8TEX_H__
13     #define __D3DX8TEX_H__
14    
15    
16     //-------------------------------------------------------------------------
17     // D3DX_FILTER flags:
18     // ------------------
19     //
20     // A valid filter must contain one of these values:
21     //
22     // D3DX_FILTER_NONE
23     // No scaling or filtering will take place. Pixels outside the bounds
24     // of the source image are assumed to be transparent black.
25     // D3DX_FILTER_POINT
26     // Each destination pixel is computed by sampling the nearest pixel
27     // from the source image.
28     // D3DX_FILTER_LINEAR
29     // Each destination pixel is computed by linearly interpolating between
30     // the nearest pixels in the source image. This filter works best
31     // when the scale on each axis is less than 2.
32     // D3DX_FILTER_TRIANGLE
33     // Every pixel in the source image contributes equally to the
34     // destination image. This is the slowest of all the filters.
35     // D3DX_FILTER_BOX
36     // Each pixel is computed by averaging a 2x2(x2) box pixels from
37     // the source image. Only works when the dimensions of the
38     // destination are half those of the source. (as with mip maps)
39     //
40     //
41     // And can be OR'd with any of these optional flags:
42     //
43     // D3DX_FILTER_MIRROR_U
44     // Indicates that pixels off the edge of the texture on the U-axis
45     // should be mirrored, not wraped.
46     // D3DX_FILTER_MIRROR_V
47     // Indicates that pixels off the edge of the texture on the V-axis
48     // should be mirrored, not wraped.
49     // D3DX_FILTER_MIRROR_W
50     // Indicates that pixels off the edge of the texture on the W-axis
51     // should be mirrored, not wraped.
52     // D3DX_FILTER_MIRROR
53     // Same as specifying D3DX_FILTER_MIRROR_U, D3DX_FILTER_MIRROR_V,
54     // and D3DX_FILTER_MIRROR_V
55     // D3DX_FILTER_DITHER
56     // Dithers the resulting image.
57     //
58     //-------------------------------------------------------------------------
59    
60     #define D3DX_FILTER_NONE (1 << 0)
61     #define D3DX_FILTER_POINT (2 << 0)
62     #define D3DX_FILTER_LINEAR (3 << 0)
63     #define D3DX_FILTER_TRIANGLE (4 << 0)
64     #define D3DX_FILTER_BOX (5 << 0)
65    
66     #define D3DX_FILTER_MIRROR_U (1 << 16)
67     #define D3DX_FILTER_MIRROR_V (2 << 16)
68     #define D3DX_FILTER_MIRROR_W (4 << 16)
69     #define D3DX_FILTER_MIRROR (7 << 16)
70     #define D3DX_FILTER_DITHER (8 << 16)
71    
72    
73     //-------------------------------------------------------------------------
74     // D3DXIMAGE_INFO:
75     // ---------------
76     // This structure is used to return a rough description of what the
77     // the original contents of an image file looked like.
78     //
79     // Width
80     // Width of original image in pixels
81     // Height
82     // Height of original image in pixels
83     // Depth
84     // Depth of original image in pixels
85     // MipLevels
86     // Number of mip levels in original image
87     // Format
88     // D3D format which most closely describes the data in original image
89     //
90     //-------------------------------------------------------------------------
91    
92    
93     typedef struct _D3DXIMAGE_INFO
94     {
95     UINT Width;
96     UINT Height;
97     UINT Depth;
98     UINT MipLevels;
99     D3DFORMAT Format;
100    
101     } D3DXIMAGE_INFO;
102    
103    
104    
105     #ifdef __cplusplus
106     extern "C" {
107     #endif //__cplusplus
108    
109    
110     ///////////////////////////////////////////////////////////////////////////
111     ///////////////////////////////////////////////////////////////////////////
112     ///////////////////////////////////////////////////////////////////////////
113    
114    
115     //-------------------------------------------------------------------------
116     // D3DXLoadSurfaceFromFile/Resource:
117     // ---------------------------------
118     // Load surface from a file or resource
119     //
120     // Parameters:
121     // pDestSurface
122     // Destination surface, which will receive the image.
123     // pDestPalette
124     // Destination palette of 256 colors, or NULL
125     // pDestRect
126     // Destination rectangle, or NULL for entire surface
127     // pSrcFile
128     // File name of the source image.
129     // pSrcModule
130     // Module where resource is located, or NULL for module associated
131     // with image the os used to create the current process.
132     // pSrcResource
133     // Resource name
134     // pSrcData
135     // Pointer to file in memory.
136     // SrcDataSize
137     // Size in bytes of file in memory.
138     // pSrcRect
139     // Source rectangle, or NULL for entire image
140     // Filter
141     // D3DX_FILTER flags controlling how the image is filtered.
142     // Or D3DX_DEFAULT for D3DX_FILTER_TRIANGLE.
143     // ColorKey
144     // Color to replace with transparent black, or 0 to disable colorkey.
145     // This is always a 32-bit ARGB color, independent of the source image
146     // format. Alpha is significant, and should usually be set to FF for
147     // opaque colorkeys. (ex. Opaque black == 0xff000000)
148     // pSrcInfo
149     // Pointer to a D3DXIMAGE_INFO structure to be filled in with the
150     // description of the data in the source image file, or NULL.
151     //
152     //-------------------------------------------------------------------------
153     HRESULT WINAPI
154     D3DXLoadSurfaceFromFileA(
155     LPDIRECT3DSURFACE8 pDestSurface,
156     CONST PALETTEENTRY* pDestPalette,
157     CONST RECT* pDestRect,
158     LPCSTR pSrcFile,
159     CONST RECT* pSrcRect,
160     DWORD Filter,
161     D3DCOLOR ColorKey,
162     D3DXIMAGE_INFO* pSrcInfo);
163    
164     HRESULT WINAPI
165     D3DXLoadSurfaceFromFileW(
166     LPDIRECT3DSURFACE8 pDestSurface,
167     CONST PALETTEENTRY* pDestPalette,
168     CONST RECT* pDestRect,
169     LPCWSTR pSrcFile,
170     CONST RECT* pSrcRect,
171     DWORD Filter,
172     D3DCOLOR ColorKey,
173     D3DXIMAGE_INFO* pSrcInfo);
174    
175     #ifdef UNICODE
176     #define D3DXLoadSurfaceFromFile D3DXLoadSurfaceFromFileW
177     #else
178     #define D3DXLoadSurfaceFromFile D3DXLoadSurfaceFromFileA
179     #endif
180    
181    
182     HRESULT WINAPI
183     D3DXLoadSurfaceFromResourceA(
184     LPDIRECT3DSURFACE8 pDestSurface,
185     CONST PALETTEENTRY* pDestPalette,
186     CONST RECT* pDestRect,
187     HMODULE hSrcModule,
188     LPCSTR pSrcResource,
189     CONST RECT* pSrcRect,
190     DWORD Filter,
191     D3DCOLOR ColorKey,
192     D3DXIMAGE_INFO* pSrcInfo);
193    
194     HRESULT WINAPI
195     D3DXLoadSurfaceFromResourceW(
196     LPDIRECT3DSURFACE8 pDestSurface,
197     CONST PALETTEENTRY* pDestPalette,
198     CONST RECT* pDestRect,
199     HMODULE hSrcModule,
200     LPCWSTR pSrcResource,
201     CONST RECT* pSrcRect,
202     DWORD Filter,
203     D3DCOLOR ColorKey,
204     D3DXIMAGE_INFO* pSrcInfo);
205    
206    
207     #ifdef UNICODE
208     #define D3DXLoadSurfaceFromResource D3DXLoadSurfaceFromResourceW
209     #else
210     #define D3DXLoadSurfaceFromResource D3DXLoadSurfaceFromResourceA
211     #endif
212    
213    
214     HRESULT WINAPI
215     D3DXLoadSurfaceFromFileInMemory(
216     LPDIRECT3DSURFACE8 pDestSurface,
217     CONST PALETTEENTRY* pDestPalette,
218     CONST RECT* pDestRect,
219     LPCVOID pSrcData,
220     UINT SrcDataSize,
221     CONST RECT* pSrcRect,
222     DWORD Filter,
223     D3DCOLOR ColorKey,
224     D3DXIMAGE_INFO* pSrcInfo);
225    
226    
227    
228     //-------------------------------------------------------------------------
229     // D3DXLoadSurfaceFromSurface:
230     // --------------------------
231     // Load surface from another surface (with color conversion)
232     //
233     // Parameters:
234     // pDestSurface
235     // Destination surface, which will receive the image.
236     // pDestPalette
237     // Destination palette of 256 colors, or NULL
238     // pDestRect
239     // Destination rectangle, or NULL for entire surface
240     // pSrcSurface
241     // Source surface
242     // pSrcPalette
243     // Source palette of 256 colors, or NULL
244     // pSrcRect
245     // Source rectangle, or NULL for entire surface
246     // Filter
247     // D3DX_FILTER flags controlling how the image is filtered.
248     // Or D3DX_DEFAULT for D3DX_FILTER_TRIANGLE.
249     // ColorKey
250     // Color to replace with transparent black, or 0 to disable colorkey.
251     // This is always a 32-bit ARGB color, independent of the source image
252     // format. Alpha is significant, and should usually be set to FF for
253     // opaque colorkeys. (ex. Opaque black == 0xff000000)
254     //
255     //-------------------------------------------------------------------------
256     HRESULT WINAPI
257     D3DXLoadSurfaceFromSurface(
258     LPDIRECT3DSURFACE8 pDestSurface,
259     CONST PALETTEENTRY* pDestPalette,
260     CONST RECT* pDestRect,
261     LPDIRECT3DSURFACE8 pSrcSurface,
262     CONST PALETTEENTRY* pSrcPalette,
263     CONST RECT* pSrcRect,
264     DWORD Filter,
265     D3DCOLOR ColorKey);
266    
267    
268     //-------------------------------------------------------------------------
269     // D3DXLoadSurfaceFromMemory:
270     // ------------------------
271     // Load surface from memory.
272     //
273     // Parameters:
274     // pDestSurface
275     // Destination surface, which will receive the image.
276     // pDestPalette
277     // Destination palette of 256 colors, or NULL
278     // pDestRect
279     // Destination rectangle, or NULL for entire surface
280     // pSrcMemory
281     // Pointer to the top-left corner of the source image in memory
282     // SrcFormat
283     // Pixel format of the source image.
284     // SrcPitch
285     // Pitch of source image, in bytes. For DXT formats, this number
286     // should represent the width of one row of cells, in bytes.
287     // pSrcPalette
288     // Source palette of 256 colors, or NULL
289     // pSrcRect
290     // Source rectangle.
291     // Filter
292     // D3DX_FILTER flags controlling how the image is filtered.
293     // Or D3DX_DEFAULT for D3DX_FILTER_TRIANGLE.
294     // ColorKey
295     // Color to replace with transparent black, or 0 to disable colorkey.
296     // This is always a 32-bit ARGB color, independent of the source image
297     // format. Alpha is significant, and should usually be set to FF for
298     // opaque colorkeys. (ex. Opaque black == 0xff000000)
299     //
300     //-------------------------------------------------------------------------
301     HRESULT WINAPI
302     D3DXLoadSurfaceFromMemory(
303     LPDIRECT3DSURFACE8 pDestSurface,
304     CONST PALETTEENTRY* pDestPalette,
305     CONST RECT* pDestRect,
306     LPCVOID pSrcMemory,
307     D3DFORMAT SrcFormat,
308     UINT SrcPitch,
309     CONST PALETTEENTRY* pSrcPalette,
310     CONST RECT* pSrcRect,
311     DWORD Filter,
312     D3DCOLOR ColorKey);
313    
314    
315    
316     ///////////////////////////////////////////////////////////////////////////
317     ///////////////////////////////////////////////////////////////////////////
318     ///////////////////////////////////////////////////////////////////////////
319    
320    
321    
322     //-------------------------------------------------------------------------
323     // D3DXLoadVolumeFromVolume:
324     // --------------------------
325     // Load volume from another volume (with color conversion)
326     //
327     // Parameters:
328     // pDestVolume
329     // Destination volume, which will receive the image.
330     // pDestPalette
331     // Destination palette of 256 colors, or NULL
332     // pDestBox
333     // Destination box, or NULL for entire volume
334     // pSrcVolume
335     // Source volume
336     // pSrcPalette
337     // Source palette of 256 colors, or NULL
338     // pSrcBox
339     // Source box, or NULL for entire volume
340     // Filter
341     // D3DX_FILTER flags controlling how the image is filtered.
342     // Or D3DX_DEFAULT for D3DX_FILTER_TRIANGLE.
343     // ColorKey
344     // Color to replace with transparent black, or 0 to disable colorkey.
345     // This is always a 32-bit ARGB color, independent of the source image
346     // format. Alpha is significant, and should usually be set to FF for
347     // opaque colorkeys. (ex. Opaque black == 0xff000000)
348     //
349     //-------------------------------------------------------------------------
350     HRESULT WINAPI
351     D3DXLoadVolumeFromVolume(
352     LPDIRECT3DVOLUME8 pDestVolume,
353     CONST PALETTEENTRY* pDestPalette,
354     CONST D3DBOX* pDestBox,
355     LPDIRECT3DVOLUME8 pSrcVolume,
356     CONST PALETTEENTRY* pSrcPalette,
357     CONST D3DBOX* pSrcBox,
358     DWORD Filter,
359     D3DCOLOR ColorKey);
360    
361    
362     //-------------------------------------------------------------------------
363     // D3DXLoadVolumeFromMemory:
364     // ------------------------
365     // Load volume from memory.
366     //
367     // Parameters:
368     // pDestVolume
369     // Destination volume, which will receive the image.
370     // pDestPalette
371     // Destination palette of 256 colors, or NULL
372     // pDestBox
373     // Destination box, or NULL for entire volume
374     // pSrcMemory
375     // Pointer to the top-left corner of the source volume in memory
376     // SrcFormat
377     // Pixel format of the source volume.
378     // SrcRowPitch
379     // Pitch of source image, in bytes. For DXT formats, this number
380     // should represent the size of one row of cells, in bytes.
381     // SrcSlicePitch
382     // Pitch of source image, in bytes. For DXT formats, this number
383     // should represent the size of one slice of cells, in bytes.
384     // pSrcPalette
385     // Source palette of 256 colors, or NULL
386     // pSrcBox
387     // Source box.
388     // Filter
389     // D3DX_FILTER flags controlling how the image is filtered.
390     // Or D3DX_DEFAULT for D3DX_FILTER_TRIANGLE.
391     // ColorKey
392     // Color to replace with transparent black, or 0 to disable colorkey.
393     // This is always a 32-bit ARGB color, independent of the source image
394     // format. Alpha is significant, and should usually be set to FF for
395     // opaque colorkeys. (ex. Opaque black == 0xff000000)
396     //
397     //-------------------------------------------------------------------------
398     HRESULT WINAPI
399     D3DXLoadVolumeFromMemory(
400     LPDIRECT3DVOLUME8 pDestVolume,
401     CONST PALETTEENTRY* pDestPalette,
402     CONST D3DBOX* pDestBox,
403     LPCVOID pSrcMemory,
404     D3DFORMAT SrcFormat,
405     UINT SrcRowPitch,
406     UINT SrcSlicePitch,
407     CONST PALETTEENTRY* pSrcPalette,
408     CONST D3DBOX* pSrcBox,
409     DWORD Filter,
410     D3DCOLOR ColorKey);
411    
412    
413     ///////////////////////////////////////////////////////////////////////////
414     ///////////////////////////////////////////////////////////////////////////
415     ///////////////////////////////////////////////////////////////////////////
416    
417    
418    
419    
420     //-------------------------------------------------------------------------
421     // D3DXCheckTextureRequirements:
422     // -----------------------------
423     //
424     // Checks texture creation parameters. If parameters are invalid, this
425     // function returns corrected parameters.
426     //
427     // Parameters:
428     //
429     // pDevice
430     // The D3D device to be used
431     // pWidth
432     // Desired width in pixels, or NULL. Returns corrected width.
433     // pHeight
434     // Desired height in pixels, or NULL. Returns corrected height.
435     // pNumMipLevels
436     // Number of desired mipmap levels, or NULL. Returns corrected number.
437     // Usage
438     // Texture usage flags
439     // pFormat
440     // Desired pixel format, or NULL. Returns corrected format.
441     // Pool
442     // Memory pool to be used to create texture
443     //
444     //-------------------------------------------------------------------------
445     HRESULT WINAPI
446     D3DXCheckTextureRequirements(
447     LPDIRECT3DDEVICE8 pDevice,
448     UINT* pWidth,
449     UINT* pHeight,
450     UINT* pNumMipLevels,
451     DWORD Usage,
452     D3DFORMAT* pFormat,
453     D3DPOOL Pool);
454    
455    
456     //-------------------------------------------------------------------------
457     // D3DXCreateTexture:
458     // ------------------
459     // Create an empty texture
460     //
461     // Parameters:
462     //
463     // pDevice
464     // The D3D device with which the texture is going to be used.
465     // Width
466     // width in pixels; must be non-zero
467     // Height
468     // height in pixels; must be non-zero
469     // MipLevels
470     // number of mip levels desired; if zero or D3DX_DEFAULT, a complete
471     // mipmap chain will be created.
472     // Usage
473     // Texture usage flags
474     // Format
475     // Pixel format.
476     // Pool
477     // Memory pool to be used to create texture
478     // ppTexture
479     // The texture object that will be created
480     //
481     //-------------------------------------------------------------------------
482     HRESULT WINAPI
483     D3DXCreateTexture(
484     LPDIRECT3DDEVICE8 pDevice,
485     UINT Width,
486     UINT Height,
487     UINT MipLevels,
488     DWORD Usage,
489     D3DFORMAT Format,
490     D3DPOOL Pool,
491     LPDIRECT3DTEXTURE8* ppTexture);
492    
493    
494     //-------------------------------------------------------------------------
495     // D3DXCreateTextureFromFile:
496     // --------------------------
497     // Create a texture object from a file.
498     //
499     // Parameters:
500     //
501     // pDevice
502     // The D3D device with which the texture is going to be used.
503     // pSrcFile
504     // File name.
505     // hSrcModule
506     // Module handle. if NULL, current module will be used.
507     // pSrcResource
508     // Resource name in module
509     // pvSrcData
510     // Pointer to file in memory.
511     // SrcDataSize
512     // Size in bytes of file in memory.
513     // Width
514     // Width in pixels; if zero or D3DX_DEFAULT, the width will be taken
515     // from the file.
516     // Height
517     // Height in pixels; if zero of D3DX_DEFAULT, the height will be taken
518     // from the file.
519     // MipLevels
520     // Number of mip levels; if zero or D3DX_DEFAULT, a complete mipmap
521     // chain will be created.
522     // Usage
523     // Texture usage flags
524     // Format
525     // Desired pixel format. If D3DFMT_UNKNOWN, the format will be
526     // taken from the file.
527     // Pool
528     // Memory pool to be used to create texture
529     // Filter
530     // D3DX_FILTER flags controlling how the image is filtered.
531     // Or D3DX_DEFAULT for D3DX_FILTER_TRIANGLE.
532     // MipFilter
533     // D3DX_FILTER flags controlling how each miplevel is filtered.
534     // Or D3DX_DEFAULT for D3DX_FILTER_BOX,
535     // ColorKey
536     // Color to replace with transparent black, or 0 to disable colorkey.
537     // This is always a 32-bit ARGB color, independent of the source image
538     // format. Alpha is significant, and should usually be set to FF for
539     // opaque colorkeys. (ex. Opaque black == 0xff000000)
540     // pSrcInfo
541     // Pointer to a D3DXIMAGE_INFO structure to be filled in with the
542     // description of the data in the source image file, or NULL.
543     // pPalette
544     // 256 color palette to be filled in, or NULL
545     // ppTexture
546     // The texture object that will be created
547     //
548     //-------------------------------------------------------------------------
549     HRESULT WINAPI
550     D3DXCreateTextureFromFileA(
551     LPDIRECT3DDEVICE8 pDevice,
552     LPCSTR pSrcFile,
553     LPDIRECT3DTEXTURE8* ppTexture);
554    
555     HRESULT WINAPI
556     D3DXCreateTextureFromFileW(
557     LPDIRECT3DDEVICE8 pDevice,
558     LPCWSTR pSrcFile,
559     LPDIRECT3DTEXTURE8* ppTexture);
560    
561     #ifdef UNICODE
562     #define D3DXCreateTextureFromFile D3DXCreateTextureFromFileW
563     #else
564     #define D3DXCreateTextureFromFile D3DXCreateTextureFromFileA
565     #endif
566    
567    
568     HRESULT WINAPI
569     D3DXCreateTextureFromResourceA(
570     LPDIRECT3DDEVICE8 pDevice,
571     HMODULE hSrcModule,
572     LPCSTR pSrcResource,
573     LPDIRECT3DTEXTURE8* ppTexture);
574    
575     HRESULT WINAPI
576     D3DXCreateTextureFromResourceW(
577     LPDIRECT3DDEVICE8 pDevice,
578     HMODULE hSrcModule,
579     LPCWSTR pSrcResource,
580     LPDIRECT3DTEXTURE8* ppTexture);
581    
582     #ifdef UNICODE
583     #define D3DXCreateTextureFromResource D3DXCreateTextureFromResourceW
584     #else
585     #define D3DXCreateTextureFromResource D3DXCreateTextureFromResourceA
586     #endif
587    
588    
589     HRESULT WINAPI
590     D3DXCreateTextureFromFileExA(
591     LPDIRECT3DDEVICE8 pDevice,
592     LPCSTR pSrcFile,
593     UINT Width,
594     UINT Height,
595     UINT MipLevels,
596     DWORD Usage,
597     D3DFORMAT Format,
598     D3DPOOL Pool,
599     DWORD Filter,
600     DWORD MipFilter,
601     D3DCOLOR ColorKey,
602     D3DXIMAGE_INFO* pSrcInfo,
603     PALETTEENTRY* pPalette,
604     LPDIRECT3DTEXTURE8* ppTexture);
605    
606     HRESULT WINAPI
607     D3DXCreateTextureFromFileExW(
608     LPDIRECT3DDEVICE8 pDevice,
609     LPCWSTR pSrcFile,
610     UINT Width,
611     UINT Height,
612     UINT MipLevels,
613     DWORD Usage,
614     D3DFORMAT Format,
615     D3DPOOL Pool,
616     DWORD Filter,
617     DWORD MipFilter,
618     D3DCOLOR ColorKey,
619     D3DXIMAGE_INFO* pSrcInfo,
620     PALETTEENTRY* pPalette,
621     LPDIRECT3DTEXTURE8* ppTexture);
622    
623     #ifdef UNICODE
624     #define D3DXCreateTextureFromFileEx D3DXCreateTextureFromFileExW
625     #else
626     #define D3DXCreateTextureFromFileEx D3DXCreateTextureFromFileExA
627     #endif
628    
629    
630     HRESULT WINAPI
631     D3DXCreateTextureFromResourceExA(
632     LPDIRECT3DDEVICE8 pDevice,
633     HMODULE hSrcModule,
634     LPCSTR pSrcResource,
635     UINT Width,
636     UINT Height,
637     UINT MipLevels,
638     DWORD Usage,
639     D3DFORMAT Format,
640     D3DPOOL Pool,
641     DWORD Filter,
642     DWORD MipFilter,
643     D3DCOLOR ColorKey,
644     D3DXIMAGE_INFO* pSrcInfo,
645     PALETTEENTRY* pPalette,
646     LPDIRECT3DTEXTURE8* ppTexture);
647    
648     HRESULT WINAPI
649     D3DXCreateTextureFromResourceExW(
650     LPDIRECT3DDEVICE8 pDevice,
651     HMODULE hSrcModule,
652     LPCWSTR pSrcResource,
653     UINT Width,
654     UINT Height,
655     UINT MipLevels,
656     DWORD Usage,
657     D3DFORMAT Format,
658     D3DPOOL Pool,
659     DWORD Filter,
660     DWORD MipFilter,
661     D3DCOLOR ColorKey,
662     D3DXIMAGE_INFO* pSrcInfo,
663     PALETTEENTRY* pPalette,
664     LPDIRECT3DTEXTURE8* ppTexture);
665    
666     #ifdef UNICODE
667     #define D3DXCreateTextureFromResourceEx D3DXCreateTextureFromResourceExW
668     #else
669     #define D3DXCreateTextureFromResourceEx D3DXCreateTextureFromResourceExA
670     #endif
671    
672    
673     HRESULT WINAPI
674     D3DXCreateTextureFromFileInMemory(
675     LPDIRECT3DDEVICE8 pDevice,
676     LPCVOID pSrcData,
677     UINT SrcDataSize,
678     LPDIRECT3DTEXTURE8* ppTexture);
679    
680    
681     HRESULT WINAPI
682     D3DXCreateTextureFromFileInMemoryEx(
683     LPDIRECT3DDEVICE8 pDevice,
684     LPCVOID pSrcData,
685     UINT SrcDataSize,
686     UINT Width,
687     UINT Height,
688     UINT MipLevels,
689     DWORD Usage,
690     D3DFORMAT Format,
691     D3DPOOL Pool,
692     DWORD Filter,
693     DWORD MipFilter,
694     D3DCOLOR ColorKey,
695     D3DXIMAGE_INFO* pSrcInfo,
696     PALETTEENTRY* pPalette,
697     LPDIRECT3DTEXTURE8* ppTexture);
698    
699    
700    
701     //-------------------------------------------------------------------------
702     // D3DXFilterTexture:
703     // ------------------
704     // Filters mipmaps levels of a texture.
705     //
706     // Parameters:
707     // pTexture
708     // The texture object to be filtered
709     // pPalette
710     // 256 color palette to be used, or NULL for non-palettized formats
711     // SrcLevel
712     // The level whose image is used to generate the subsequent levels.
713     // Filter
714     // D3DX_FILTER flags controlling how each miplevel is filtered.
715     // Or D3DX_DEFAULT for D3DX_FILTER_BOX,
716     //
717     //-------------------------------------------------------------------------
718     HRESULT WINAPI
719     D3DXFilterTexture(
720     LPDIRECT3DTEXTURE8 pTexture,
721     CONST PALETTEENTRY* pPalette,
722     UINT SrcLevel,
723     DWORD Filter);
724    
725    
726    
727    
728    
729     ///////////////////////////////////////////////////////////////////////////
730     ///////////////////////////////////////////////////////////////////////////
731     ///////////////////////////////////////////////////////////////////////////
732    
733    
734    
735    
736    
737     //-------------------------------------------------------------------------
738     // D3DXCheckCubeTextureRequirements:
739     // ---------------------------------
740     //
741     // Checks cube texture creation parameters. If parameters are invalid,
742     // this function returns corrected parameters.
743     //
744     // Parameters:
745     //
746     // pDevice
747     // The D3D device to be used
748     // pSize
749     // Desired width and height in pixels, or NULL. Returns corrected size.
750     // pNumMipLevels
751     // Number of desired mipmap levels, or NULL. Returns corrected number.
752     // Usage
753     // Texture usage flags
754     // pFormat
755     // Desired pixel format, or NULL. Returns corrected format.
756     // Pool
757     // Memory pool to be used to create texture
758     //
759     //-------------------------------------------------------------------------
760     HRESULT WINAPI
761     D3DXCheckCubeTextureRequirements(
762     LPDIRECT3DDEVICE8 pDevice,
763     UINT* pSize,
764     UINT* pNumMipLevels,
765     DWORD Usage,
766     D3DFORMAT* pFormat,
767     D3DPOOL Pool);
768    
769    
770     //-------------------------------------------------------------------------
771     // D3DXCreateCubeTexture:
772     // ----------------------
773     // Create an empty cube texture
774     //
775     // Parameters:
776     //
777     // pDevice
778     // The D3D device with which the texture is going to be used.
779     // Size
780     // width and height in pixels; must be non-zero
781     // MipLevels
782     // number of mip levels desired; if zero or D3DX_DEFAULT, a complete
783     // mipmap chain will be created.
784     // Usage
785     // Texture usage flags
786     // Format
787     // Pixel format.
788     // Pool
789     // Memory pool to be used to create texture
790     // ppCubeTexture
791     // The cube texture object that will be created
792     //
793     //-------------------------------------------------------------------------
794     HRESULT WINAPI
795     D3DXCreateCubeTexture(
796     LPDIRECT3DDEVICE8 pDevice,
797     UINT Size,
798     UINT MipLevels,
799     DWORD Usage,
800     D3DFORMAT Format,
801     D3DPOOL Pool,
802     LPDIRECT3DCUBETEXTURE8* ppCubeTexture);
803    
804    
805     //-------------------------------------------------------------------------
806     // D3DXCreateCubeTextureFromFile:
807     // --------------------------
808     // Create a cube texture object from a file.
809     //
810     // Parameters:
811     //
812     // pDevice
813     // The D3D device with which the texture is going to be used.
814     // pSrcFile
815     // File name.
816     // pvSrcData
817     // Pointer to file in memory.
818     // SrcDataSize
819     // Size in bytes of file in memory.
820     // Size
821     // Width and height in pixels; if zero or D3DX_DEFAULT, the size
822     // will be taken from the file.
823     // MipLevels
824     // Number of mip levels; if zero or D3DX_DEFAULT, a complete mipmap
825     // chain will be created.
826     // Format
827     // Desired pixel format. If D3DFMT_UNKNOWN, the format will be
828     // taken from the file.
829     // Filter
830     // D3DX_FILTER flags controlling how the image is filtered.
831     // Or D3DX_DEFAULT for D3DX_FILTER_TRIANGLE.
832     // MipFilter
833     // D3DX_FILTER flags controlling how each miplevel is filtered.
834     // Or D3DX_DEFAULT for D3DX_FILTER_BOX,
835     // ColorKey
836     // Color to replace with transparent black, or 0 to disable colorkey.
837     // This is always a 32-bit ARGB color, independent of the source image
838     // format. Alpha is significant, and should usually be set to FF for
839     // opaque colorkeys. (ex. Opaque black == 0xff000000)
840     // pSrcInfo
841     // Pointer to a D3DXIMAGE_INFO structure to be filled in with the
842     // description of the data in the source image file, or NULL.
843     // pPalette
844     // 256 color palette to be filled in, or NULL
845     // ppCubeTexture
846     // The cube texture object that will be created
847     //
848     //-------------------------------------------------------------------------
849     HRESULT WINAPI
850     D3DXCreateCubeTextureFromFileA(
851     LPDIRECT3DDEVICE8 pDevice,
852     LPCSTR pSrcFile,
853     LPDIRECT3DCUBETEXTURE8* ppCubeTexture);
854    
855     HRESULT WINAPI
856     D3DXCreateCubeTextureFromFileW(
857     LPDIRECT3DDEVICE8 pDevice,
858     LPCWSTR pSrcFile,
859     LPDIRECT3DCUBETEXTURE8* ppCubeTexture);
860    
861     #ifdef UNICODE
862     #define D3DXCreateCubeTextureFromFile D3DXCreateCubeTextureFromFileW
863     #else
864     #define D3DXCreateCubeTextureFromFile D3DXCreateCubeTextureFromFileA
865     #endif
866    
867    
868     HRESULT WINAPI
869     D3DXCreateCubeTextureFromFileExA(
870     LPDIRECT3DDEVICE8 pDevice,
871     LPCSTR pSrcFile,
872     UINT Size,
873     UINT MipLevels,
874     DWORD Usage,
875     D3DFORMAT Format,
876     D3DPOOL Pool,
877     DWORD Filter,
878     DWORD MipFilter,
879     D3DCOLOR ColorKey,
880     D3DXIMAGE_INFO* pSrcInfo,
881     PALETTEENTRY* pPalette,
882     LPDIRECT3DCUBETEXTURE8* ppCubeTexture);
883    
884     HRESULT WINAPI
885     D3DXCreateCubeTextureFromFileExW(
886     LPDIRECT3DDEVICE8 pDevice,
887     LPCWSTR pSrcFile,
888     UINT Size,
889     UINT MipLevels,
890     DWORD Usage,
891     D3DFORMAT Format,
892     D3DPOOL Pool,
893     DWORD Filter,
894     DWORD MipFilter,
895     D3DCOLOR ColorKey,
896     D3DXIMAGE_INFO* pSrcInfo,
897     PALETTEENTRY* pPalette,
898     LPDIRECT3DCUBETEXTURE8* ppCubeTexture);
899    
900     #ifdef UNICODE
901     #define D3DXCreateCubeTextureFromFileEx D3DXCreateCubeTextureFromFileExW
902     #else
903     #define D3DXCreateCubeTextureFromFileEx D3DXCreateCubeTextureFromFileExA
904     #endif
905    
906    
907     HRESULT WINAPI
908     D3DXCreateCubeTextureFromFileInMemory(
909     LPDIRECT3DDEVICE8 pDevice,
910     LPCVOID pSrcData,
911     UINT SrcDataSize,
912     LPDIRECT3DCUBETEXTURE8* ppCubeTexture);
913    
914    
915     HRESULT WINAPI
916     D3DXCreateCubeTextureFromFileInMemoryEx(
917     LPDIRECT3DDEVICE8 pDevice,
918     LPCVOID pSrcData,
919     UINT SrcDataSize,
920     UINT Size,
921     UINT MipLevels,
922     DWORD Usage,
923     D3DFORMAT Format,
924     D3DPOOL Pool,
925     DWORD Filter,
926     DWORD MipFilter,
927     D3DCOLOR ColorKey,
928     D3DXIMAGE_INFO* pSrcInfo,
929     PALETTEENTRY* pPalette,
930     LPDIRECT3DCUBETEXTURE8* ppCubeTexture);
931    
932    
933     //-------------------------------------------------------------------------
934     // D3DXFilterCubeTexture:
935     // ----------------------
936     // Filters mipmaps levels of a cube texture map.
937     //
938     // Parameters:
939     // pCubeTexture
940     // The cube texture object to be filtered
941     // pPalette
942     // 256 color palette to be used, or NULL
943     // SrcLevel
944     // The level whose image is used to generate the subsequent levels.
945     // Filter
946     // D3DX_FILTER flags controlling how each miplevel is filtered.
947     // Or D3DX_DEFAULT for D3DX_FILTER_BOX,
948     //
949     //-------------------------------------------------------------------------
950     HRESULT WINAPI
951     D3DXFilterCubeTexture(
952     LPDIRECT3DCUBETEXTURE8 pCubeTexture,
953     CONST PALETTEENTRY* pPalette,
954     UINT SrcLevel,
955     DWORD Filter);
956    
957    
958    
959    
960     ///////////////////////////////////////////////////////////////////////////
961     ///////////////////////////////////////////////////////////////////////////
962     ///////////////////////////////////////////////////////////////////////////
963    
964    
965    
966    
967     //-------------------------------------------------------------------------
968     // D3DXCheckVolumeTextureRequirements:
969     // -----------------------------------
970     //
971     // Checks volume texture creation parameters. If parameters are invalid,
972     // this function returns corrected parameters.
973     //
974     // Parameters:
975     //
976     // pDevice
977     // The D3D device to be used
978     // pWidth
979     // Desired width in pixels, or NULL. Returns corrected size.
980     // pHeight
981     // Desired height in pixels, or NULL. Returns corrected size.
982     // pDepth
983     // Desired depth in pixels, or NULL. Returns corrected size.
984     // pNumMipLevels
985     // Number of desired mipmap levels, or NULL. Returns corrected number.
986     // pFormat
987     // Desired pixel format, or NULL. Returns corrected format.
988     //
989     //-------------------------------------------------------------------------
990     HRESULT WINAPI
991     D3DXCheckVolumeTextureRequirements(
992     LPDIRECT3DDEVICE8 pDevice,
993     UINT* pWidth,
994     UINT* pHeight,
995     UINT* pDepth,
996     UINT* pNumMipLevels,
997     DWORD Usage,
998     D3DFORMAT* pFormat,
999     D3DPOOL Pool);
1000    
1001    
1002     //-------------------------------------------------------------------------
1003     // D3DXCreateVolumeTexture:
1004     // ----------------------
1005     // Create an empty volume texture
1006     //
1007     // Parameters:
1008     //
1009     // pDevice
1010     // The D3D device with which the texture is going to be used.
1011     // Width
1012     // width in pixels; must be non-zero
1013     // Height
1014     // height in pixels; must be non-zero
1015     // Depth
1016     // depth in pixels; must be non-zero
1017     // MipLevels
1018     // number of mip levels desired; if zero or D3DX_DEFAULT, a complete
1019     // mipmap chain will be created.
1020     // Format
1021     // pixel format.
1022     // ppVolumeTexture
1023     // The volume texture object that will be created
1024     //
1025     //-------------------------------------------------------------------------
1026     HRESULT WINAPI
1027     D3DXCreateVolumeTexture(
1028     LPDIRECT3DDEVICE8 pDevice,
1029     UINT Width,
1030     UINT Height,
1031     UINT Depth,
1032     UINT MipLevels,
1033     DWORD Usage,
1034     D3DFORMAT Format,
1035     D3DPOOL Pool,
1036     LPDIRECT3DVOLUMETEXTURE8* ppVolumeTexture);
1037    
1038    
1039     //-------------------------------------------------------------------------
1040     // D3DXFilterVolumeTexture:
1041     // ------------------------
1042     // Filters mipmaps levels of a volume texture map.
1043     //
1044     // Parameters:
1045     // pVolumeTexture
1046     // The volume texture object to be filtered
1047     // pPalette
1048     // 256 color palette to be used, or NULL
1049     // SrcLevel
1050     // The level whose image is used to generate the subsequent levels.
1051     // Filter
1052     // D3DX_FILTER flags controlling how each miplevel is filtered.
1053     // Or D3DX_DEFAULT for D3DX_FILTER_BOX,
1054     //
1055     //-------------------------------------------------------------------------
1056     HRESULT WINAPI
1057     D3DXFilterVolumeTexture(
1058     LPDIRECT3DVOLUMETEXTURE8 pVolumeTexture,
1059     CONST PALETTEENTRY* pPalette,
1060     UINT SrcLevel,
1061     DWORD Filter);
1062    
1063    
1064    
1065     #ifdef __cplusplus
1066     }
1067     #endif //__cplusplus
1068    
1069     #endif //__D3DX8TEX_H__

root@recompile.se
ViewVC Help
Powered by ViewVC 1.1.26