00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef SWTHANDLE_H
00024 #define SWTHANDLE_H
00025
00026 #include "DCommon.h"
00027 #include "PixelFormat.h"
00028
00029
00030 #define THANDLE_UPDATE (1<<0) // Force a thandle to be uploaded to the card
00031 #define THANDLE_TRANS (1<<2) // Texture has transparency
00032 #define THANDLE_LOCKED (1<<3) // THandle is currently locked (invalid for rendering etc)
00033
00034 typedef struct geRDriver_THandle
00035 {
00036 int32 Active, Width, Height, MipLevels;
00037 geRDriver_PixelFormat PixelFormat;
00038 uint16 *BitPtr[16];
00039 geRDriver_THandle *PalHandle;
00040 geRDriver_THandle *AlphaHandle;
00041
00042 uint32 Flags;
00043 } geRDriver_THandle;
00044
00045 geBoolean DRIVERCC SWTHandle_EnumPixelFormats(DRV_ENUM_PFORMAT_CB *Cb, void *Context);
00046 geBoolean SWTHandle_FreeAllTextureHandles(void);
00047 geRDriver_THandle *DRIVERCC SWTHandle_CreateTexture(int32 Width, int32 Height, int32 NumMipLevels, const geRDriver_PixelFormat *PixelFormat);
00048 geBoolean DRIVERCC SWTHandle_DestroyTexture(geRDriver_THandle *THandle);
00049
00050 geBoolean DRIVERCC SWTHandle_LockTextureHandle(geRDriver_THandle *THandle, int32 MipLevel, void **Data);
00051 geBoolean DRIVERCC SWTHandle_UnLockTextureHandle(geRDriver_THandle *THandle, int32 MipLevel);
00052 geBoolean DRIVERCC SWTHandle_GetInfo(geRDriver_THandle *THandle, int32 MipLevel, geRDriver_THandleInfo *Info);
00053
00054 geBoolean DRIVERCC SWTHandle_SetPalette(geRDriver_THandle *THandle, geRDriver_THandle *PalHandle);
00055 geRDriver_THandle *DRIVERCC SWTHandle_GetPalette(geRDriver_THandle *THandle);
00056 geBoolean DRIVERCC SWTHandle_SetAlpha(geRDriver_THandle *THandle, geRDriver_THandle *PalHandle);
00057 geRDriver_THandle *DRIVERCC SWTHandle_GetAlpha(geRDriver_THandle *THandle);
00058
00059 #endif