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

RENDER.H

Go to the documentation of this file.
00001 /****************************************************************************************/
00002 /*  render.h                                                                            */
00003 /*                                                                                      */
00004 /*  Author:       John Pollard, Ken Baird                                               */
00005 /*  Description:  header for render.c                                                   */
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 RENDER_H
00023 #define RENDER_H
00024 
00025 #include <Windows.h>
00026 
00027 #include "DCommon.h"
00028 #include "Span.h"
00029 #include "Register.h"
00030 
00031 #ifdef __cplusplus
00032 extern "C" {
00033 #endif
00034 
00035 typedef int32                   Fixed16;
00036 
00037 #define                                 ZBUFFER_PREC    (65536.0f * 65536.0f)
00038 //#define                               ZBUFFER_PREC    (32768.0f * 65536.0f)
00039 
00040 extern int32                            SpanMode;
00041 extern int32                            PolyMode;
00042 extern BOOL                             PolyIsTrans;
00043 
00044 extern BOOL                             PolyVisible;
00045 extern int32                            ActuallVisible;
00046 extern int32                            NumPixels;
00047 
00048 extern int32                            SMIN, SMAX;
00049 
00050 extern uint8                            GMipLevel;                              // Miplevel passed by the latest rendering routine
00051 extern int32                    GMipLevel4, GMipLevel20, GMipLevel4_8;
00052 extern int32                            GLMapAdd;
00053 extern DRV_LInfo                *GLInfo;
00054 extern DRV_Bitmap               *GBitmap;
00055 extern geRDriver_THandle        *GTexture;
00056 extern uint16                           *pScrPtr16bpp;
00057 
00058 extern int32                    GLightWidth;
00059 extern uint8                    *GLightData;
00060 
00061 extern int32                    DeltaX, Remaining, N_Runs, PixelCount;
00062 extern uint16                   *Source, *Dest;
00063 extern int32                    U2, V2, StepU, StepV;
00064 extern geFloat                  UDivZ, VDivZ, Zi, Z, Dx, Dy, PixelEnd;
00065 extern int32                    TxWhole, TyWhole, TxFract, TyFract;
00066 extern geFloat                  UDivZnStepX, VDivZnStepX, ZinStepX;
00067 extern int32                    Junk[2];
00068 
00069 extern geFloat                  Real16 ;        
00070 extern geFloat                  Real65536;
00071 
00072 extern int32                    U, V;
00073 
00074 extern int32                            GW, GWMask;
00075 extern int32                            GH, GHMask;
00076 extern uint8                            *GBitPtr;
00077 extern uint16                           *GBitPtr16;
00078 
00079 // 16bit zbuffer
00080 extern uint16                           *ZBuffer;
00081 
00082 extern geFloat                  UDivZStepX;
00083 extern geFloat                  UDivZStepY;
00084 extern geFloat                  VDivZStepX;
00085 extern geFloat                  VDivZStepY;
00086 
00087 extern geFloat                  UDivZOrigin;
00088 extern geFloat                  VDivZOrigin;
00089 extern geFloat                  UDivZ16StepX, VDivZ16StepX, Zi16StepX;
00090 extern geFloat                  UDivZ32StepX, VDivZ32StepX, Zi32StepX;
00091 
00092 extern geFloat                  ZiStepX;
00093 extern geFloat                  ZiStepY;
00094 extern geFloat                  ZiOrigin;
00095 
00096 extern Fixed16                  UAdjust;
00097 extern Fixed16                  VAdjust;
00098 extern Fixed16                  UAdjustL;
00099 extern Fixed16                  VAdjustL;
00100 extern Fixed16                  UAdjust1;
00101 extern Fixed16                  VAdjust1;
00102 extern Fixed16                  UAdjust2;
00103 extern Fixed16                  VAdjust2;
00104 
00105 extern Fixed16                  MaxU;
00106 extern Fixed16                  MaxV;
00107 
00108 #define ZBUFFER_SHIFT                           21
00109 #define ZBUFFER_RIGHT_SHIFT                     10
00110 
00111 // 16bit zbuffer
00112 extern uint16                   *ZBuffer;
00113 
00114 #ifdef __cplusplus
00115 }
00116 #endif
00117 
00118 BOOL RenderInit(DRV_Window *Window);
00119 BOOL RenderShutdown(void);
00120 void ClearZBuffer(DRV_Window *Window);
00121 
00122 // Render funtions
00123 BOOL DRIVERCC RenderGouraudPoly(DRV_TLVertex *Pnts, int32 NumPoints, uint32 Flags);
00124 BOOL DRIVERCC RenderWorldPoly(DRV_TLVertex *Pnts, int32 NumPoints, geRDriver_THandle *THandle, DRV_TexInfo *TexInfo, DRV_LInfo *LInfo, uint32 Flags);
00125 BOOL DRIVERCC RenderMiscTexturePoly(DRV_TLVertex *Pnts, int32 NumPoints, geRDriver_THandle *THandle, uint32 Flags);
00126 BOOL DRIVERCC DrawDecal(geRDriver_THandle *THandle, RECT *SRect, int32 x, int32 y);
00127 
00128 #endif

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