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

SWTHandle.h

Go to the documentation of this file.
00001 /****************************************************************************************/
00002 /*  SWTHandle.H                                                                         */
00003 /*                                                                                      */
00004 /*  Author: Mike Sandige, John Pollard                                                  */
00005 /*  Description:  Manager for texture construction and available texture formats for    */
00006 /*                the software driver                                                   */
00007 /*                                                                                      */
00008 /*  The contents of this file are subject to the Genesis3D Public License               */
00009 /*  Version 1.01 (the "License"); you may not use this file except in                   */
00010 /*  compliance with the License. You may obtain a copy of the License at                */
00011 /*  http://www.genesis3d.com                                                            */
00012 /*                                                                                      */
00013 /*  Software distributed under the License is distributed on an "AS IS"                 */
00014 /*  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See                */
00015 /*  the License for the specific language governing rights and limitations              */
00016 /*  under the License.                                                                  */
00017 /*                                                                                      */
00018 /*  The Original Code is Genesis3D, released March 25, 1999.                            */
00019 /*  Genesis3D Version 1.1 released November 15, 1999                                 */
00020 /*  Copyright (C) 1999 WildTangent, Inc. All Rights Reserved           */
00021 /*                                                                                      */
00022 /****************************************************************************************/
00023 #ifndef SWTHANDLE_H
00024 #define SWTHANDLE_H
00025 
00026 #include "DCommon.h"
00027 #include "PixelFormat.h"
00028 
00029 // THandle flags
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];//8 or 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

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