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

GCache.h

Go to the documentation of this file.
00001 /****************************************************************************************/
00002 /*  GCache.h                                                                            */
00003 /*                                                                                      */
00004 /*  Author: John Pollard                                                                */
00005 /*  Description: Texture cache manager for glide                                        */
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 GCACHE_H
00023 #define GCACHE_H
00024 
00025 #include <Windows.h>
00026 #include "Glide.h"
00027 
00028 #include "BaseType.h"
00029 #include "GMemMGr.h"
00030 
00031 #ifdef __cplusplus
00032 extern "C" {
00033 #endif
00034 
00035 #define GCACHE_MAX_NAME                 256
00036 
00037 typedef struct GCache                   GCache;
00038 typedef struct GCache_Type              GCache_Type;
00039 typedef struct GCache_Slot              GCache_Slot;
00040 
00041 
00042 GCache          *GCache_Create(const char *Name, GMemMgr *MemMgr);
00043 void            GCache_Destroy(GCache *Cache);
00044 geBoolean       GCache_Reset(GCache *Cache);
00045 GCache_Type *GCache_FindCacheTypeByInfo(GCache *Cache, const GrTexInfo *Info);
00046 GCache_Type *GCache_InsertCacheTypeByInfo(GCache *Cache, int32 Width, int32 Height, int32 NumMipLevels, const GrTexInfo *Info);
00047 geBoolean       GCache_UpdateSlot(GCache *Cache, GCache_Slot *Slot, GrTexInfo *Info);
00048 geBoolean       GCache_SetTexture(GCache *Cache, GCache_Slot *Slot);
00049 GCache_Type *GCache_TypeCreate(GCache *Cache, int32 Width, int32 Height, int32 NumMipLevels, const GrTexInfo *Info);
00050 void            GCache_TypeDestroy(GCache_Type *CacheType);
00051 geBoolean       GCache_FreeAllSlots(GCache *Cache);
00052 geBoolean       GCache_AdjustSlots(GCache *Cache);
00053 uint32          GCache_SlotGetMemAddress(GCache_Slot *Slot);
00054 uint32          GCache_SlotGetMemAddress(GCache_Slot *Slot);
00055 geBoolean       GCache_SlotIsValid(GCache_Slot *Slot);
00056 GCache_Slot     *GCache_TypeFindSlot(GCache_Type *CacheType);
00057 void            GCache_SlotSetUserData(GCache_Slot *Slot, void *UserData);
00058 void            *GCache_SlotGetUserData(GCache_Slot *Slot);
00059 GrTexInfo       *GCache_SlotGetInfo(GCache_Slot *Slot);
00060 void            GCache_SlotSetLRU(GCache_Slot *Slot, uint32 LRU);
00061 
00062 #ifdef __cplusplus
00063 }
00064 #endif
00065 
00066 #endif

Generated on Tue Sep 30 12:35:47 2003 for GTestAndEngine by doxygen 1.3.2