Main Page | Alphabetical List | Compound List | File List | Compound Members | File Members

TPage.h

Go to the documentation of this file.
00001 /****************************************************************************************/
00002 /*  TPage.h                                                                             */
00003 /*                                                                                      */
00004 /*  Author: John Pollard                                                                */
00005 /*  Description: D3D cache manager using pages                                          */
00006 /*                                                                                      */
00007 /*  The contents of this file are subject to the Genesis3D Public License               */
00008 /*  Version 1.01 (the "License"); you may not use this file except in                   */
00009 /*  compliance with the License. You may obtain a copy of the License at                */
00010 /*  http://www.genesis3d.com                                                            */
00011 /*                                                                                      */
00012 /*  Software distributed under the License is distributed on an "AS IS"                 */
00013 /*  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See                */
00014 /*  the License for the specific language governing rights and limitations              */
00015 /*  under the License.                                                                  */
00016 /*                                                                                      */
00017 /*  The Original Code is Genesis3D, released March 25, 1999.                            */
00018 /*  Genesis3D Version 1.1 released November 15, 1999                                 */
00019 /*  Copyright (C) 1999 WildTangent, Inc. All Rights Reserved           */
00020 /*                                                                                      */
00021 /****************************************************************************************/
00022 #ifndef TPAGE_H
00023 #define TPAGE_H
00024 
00025 #include <Windows.h>
00026 
00027 #include <DDraw.h>
00028 #include <D3D.H>
00029 
00030 typedef struct TPage_Mgr        TPage_Mgr;
00031 typedef struct TPage            TPage;
00032 typedef struct TPage_Block      TPage_Block;
00033 
00034 //
00035 // TPage_Mgr
00036 //
00037 TPage_Mgr               *TPage_MgrCreate(LPDIRECTDRAW4 lpDD, const DDSURFACEDESC2 *SurfaceDesc, int32 NumPages);
00038 void                    TPage_MgrDestroy(TPage_Mgr **TPageMgr);
00039 geBoolean               TPage_MgrHasTPage(TPage_Mgr *Mgr, TPage *Page);
00040 geBoolean               TPage_MgrAttachTPage(TPage_Mgr *Mgr, TPage *TPage);
00041 void                    TPage_MgrDetachTPage(TPage_Mgr *Mgr, TPage *TPage);
00042 TPage_Block             *TPage_MgrFindOptimalBlock(TPage_Mgr *Mgr, uint32 LRU);
00043 
00044 //
00045 // TPage
00046 //
00047 TPage                   *TPage_Create(LPDIRECTDRAW4 lpDD, const DDSURFACEDESC2 *SurfDesc);
00048 void                    TPage_CreateRef(TPage *Page);
00049 void                    TPage_Destroy(TPage **Page1);
00050 geBoolean               TPage_HasBlock(TPage *TPage, TPage_Block *Block);
00051 geBoolean               TPage_AttachBlock(TPage *Page, TPage_Block *Block);
00052 void                    TPage_DetachBlock(TPage *TPage, TPage_Block *Block);
00053 geBoolean               TPage_CreateSurfaces(TPage *Page, LPDIRECTDRAW4 lpDD, const DDSURFACEDESC2 *SurfDesc);
00054 void                    TPage_DestroySurfaces(TPage *Page);
00055 
00056 //
00057 //TPage_Block
00058 //
00059 TPage_Block             *TPage_BlockCreate(LPDIRECTDRAWSURFACE4 Surface, LPDIRECT3DTEXTURE2 Texture, const RECT *Rect);
00060 geBoolean               TPage_BlockCreateRef(TPage_Block *Block);
00061 void                    TPage_BlockDestroy(TPage_Block **Block);
00062 LPDIRECT3DTEXTURE2              TPage_BlockGetTexture(TPage_Block *Block);
00063 LPDIRECTDRAWSURFACE4    TPage_BlockGetSurface(TPage_Block *Block);
00064 const RECT              *TPage_BlockGetRect(TPage_Block *Block);
00065 void                    TPage_BlockSetLRU(TPage_Block *Block, uint32 LRU);
00066 void                    TPage_BlockSetUserData(TPage_Block *Block, void *UserData);
00067 void                    *TPage_BlockGetUserData(TPage_Block *Block);
00068 
00069 #endif  

Generated on Tue Sep 30 12:36:32 2003 for GTestAndEngine by doxygen 1.3.2