00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
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