1 //-----------------------------------------------------------------------------
4 // Desc: Functions to manage textures, including creating (loading from a
5 // file), restoring lost surfaces, invalidating, and destroying.
7 // Note: the implementation of these fucntions maintain an internal list
8 // of loaded textures. After creation, individual textures are referenced
9 // via their ASCII names.
12 // Copyright (C) 1997 Microsoft Corporation. All rights reserved
13 //-----------------------------------------------------------------------------
24 //-----------------------------------------------------------------------------
25 // Access functions for loaded textures. Note: these functions search
26 // an internal list of the textures, and use the texture associated with the
28 //-----------------------------------------------------------------------------
29 LPDIRECTDRAWSURFACE4 D3DTextr_GetSurface( TCHAR* strName );
30 LPDIRECT3DTEXTURE2 D3DTextr_GetTexture( TCHAR* strName );
35 //-----------------------------------------------------------------------------
36 // Texture invalidation and restoration functions
37 //-----------------------------------------------------------------------------
38 HRESULT D3DTextr_Invalidate( TCHAR* strName );
39 HRESULT D3DTextr_Restore( TCHAR* strName, LPDIRECT3DDEVICE3 pd3dDevice );
40 HRESULT D3DTextr_InvalidateAllTextures();
41 HRESULT D3DTextr_RestoreAllTextures( LPDIRECT3DDEVICE3 pd3dDevice );
46 //-----------------------------------------------------------------------------
47 // Texture creation and deletion functions
48 //-----------------------------------------------------------------------------
49 #define D3DTEXTR_TRANSPARENTWHITE 0x00000001
50 #define D3DTEXTR_TRANSPARENTBLACK 0x00000002
51 #define D3DTEXTR_32BITSPERPIXEL 0x00000004
53 HRESULT D3DTextr_CreateTexture( TCHAR* strName, DWORD dwStage=0L,
55 HRESULT D3DTextr_DestroyTexture( TCHAR* strName );
56 VOID D3DTextr_SetTexturePath( TCHAR* strTexturePath );