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

REGISTER.H

Go to the documentation of this file.
00001 /****************************************************************************************/
00002 /*  register.h                                                                          */
00003 /*                                                                                      */
00004 /*  Author:       John Pollard, Ken Baird                                               */
00005 /*  Description:  Texture Handle code header file                                       */
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 REGISTER_H
00023 #define REGISTER_H
00024 
00025 #include <Windows.h>
00026 
00027 #include "ddraw.h"
00028 
00029 #include "DCommon.h"
00030 
00031 #define MAX_TEXTURE_HANDLES             15000
00032 
00033 // THandle flags
00034 #define THANDLE_UPDATE          (1<<0)          // Force a thandle to be uploaded to the card
00035 #define THANDLE_TRANS           (1<<2)          // Texture has transparency
00036 #define THANDLE_LOCKED          (1<<3)          // THandle is currently locked (invalid for rendering etc)
00037 
00038 typedef struct geRDriver_THandle
00039 {
00040         int32                                           Active, Width, Height, MipLevels;
00041         geRDriver_PixelFormat   PixelFormat;
00042         uint16                                          *BitPtr[16];//8 or 16
00043         geRDriver_THandle               *PalHandle;
00044         geRDriver_THandle               *AlphaHandle;
00045 
00046         uint32                                          Flags;
00047 } geRDriver_THandle;
00048 
00049 extern  geRDriver_THandle       TextureHandles[MAX_TEXTURE_HANDLES];
00050 
00051 geBoolean                       DRIVERCC        DrvResetAll(void);
00052 geRDriver_THandle       *DRIVERCC       CreateTexture(int32 Width, int32 Height, int32 NumMipLevels, const geRDriver_PixelFormat *PixelFormat);
00053 geBoolean                       DRIVERCC        DestroyTexture(geRDriver_THandle *THandle);
00054 
00055 geBoolean                       DRIVERCC        LockTextureHandle(geRDriver_THandle *THandle, int32 MipLevel, void **Data);
00056 geBoolean                       DRIVERCC        UnLockTextureHandle(geRDriver_THandle *THandle, int32 MipLevel);
00057 geBoolean                       DRIVERCC        THandle_GetInfo(geRDriver_THandle *THandle, int32 MipLevel, geRDriver_THandleInfo *Info);
00058 
00059 geBoolean                       DRIVERCC        SetPalette(geRDriver_THandle *THandle, geRDriver_THandle *PalHandle);
00060 geRDriver_THandle       *DRIVERCC       GetPalette(geRDriver_THandle *THandle);
00061 geBoolean                       DRIVERCC        SetAlpha(geRDriver_THandle *THandle, geRDriver_THandle *PalHandle);
00062 geRDriver_THandle       *DRIVERCC       GetAlpha(geRDriver_THandle *THandle);
00063 
00064 #endif

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