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

tclip.h File Reference

#include "basetype.h"
#include "getypes.h"
#include "bitmap.h"
#include "engine.h"

Go to the source code of this file.

Functions

GENESISAPI void GENESISCC geTClip_SetupEdges (geEngine *Engine, geFloat LeftEdge, geFloat RightEdge, geFloat TopEdge, geFloat BottomEdge, geFloat BackEdge)
GENESISAPI geBoolean GENESISCC geTClip_Push (void)
GENESISAPI geBoolean GENESISCC geTClip_Pop (void)
GENESISAPI geBoolean GENESISCC geTClip_SetTexture (const geBitmap *Bitmap)
GENESISAPI void GENESISCC geTClip_Triangle (const GE_LVertex TriVertex[3])
GENESISAPI void GENESISCC geTClip_SetRenderFlags (uint32 newflags)
GENESISAPI void GENESISCC geTClip_UnclippedTriangle (const GE_LVertex TriVertex[3])


Function Documentation

GENESISAPI geBoolean GENESISCC geTClip_Pop void   ) 
 

Definition at line 174 of file Tclip.c.

References ActiveRenderFlags, GE_FALSE, GE_TRUE, geBoolean, GENESISCC, geRam_Free, geTClip_Link, geTClip_Statics, Link_Destroy(), Link_Peek(), Link_Pop(), List_Stop(), NULL, and geTClip_StaticsType::RenderFlags.

00175 {
00176 geTClip_StaticsType * TCI;
00177         if ( ! geTClip_Link )
00178                 return GE_FALSE;
00179         TCI = Link_Pop( geTClip_Link );
00180         if ( ! TCI )
00181                 return GE_FALSE;
00182         memcpy(&geTClip_Statics,TCI,sizeof(geTClip_StaticsType));
00183         geRam_Free(TCI);
00184 
00185         if ( ! Link_Peek(geTClip_Link) )
00186         {
00187                 Link_Destroy(geTClip_Link);
00188                 geTClip_Link = NULL;
00189                 List_Stop();
00190         }
00191 
00192         ActiveRenderFlags = geTClip_Statics.RenderFlags; // LA, set ARF from newly pop'd statics
00193         
00194         return GE_TRUE;
00195 }

GENESISAPI geBoolean GENESISCC geTClip_Push void   ) 
 

Definition at line 148 of file Tclip.c.

References ActiveRenderFlags, GE_FALSE, GE_TRUE, geBoolean, GENESISCC, geRam_Allocate, geTClip_Link, geTClip_Statics, Link_Create(), Link_Push(), List_Start(), and geTClip_StaticsType::RenderFlags.

00149 {
00150 geTClip_StaticsType * TCI;
00151 
00152         geTClip_Statics.RenderFlags = ActiveRenderFlags; // LA
00153 
00154         if ( ! geTClip_Link )
00155         {
00156                 List_Start();
00157                 geTClip_Link = Link_Create();
00158                 if ( ! geTClip_Link ) 
00159                         return GE_FALSE;
00160         }
00161 
00162         TCI = geRam_Allocate(sizeof(geTClip_StaticsType));
00163         if ( ! TCI )
00164                 return GE_FALSE;
00165         memcpy(TCI,&geTClip_Statics,sizeof(geTClip_StaticsType));
00166 
00167         Link_Push( geTClip_Link , TCI );
00168 
00169         geTClip_Statics.RenderFlags = 0;        // LA, this is needed to set RF = 0 for default after any _Push
00170         
00171         return GE_TRUE;
00172 }

GENESISAPI void GENESISCC geTClip_SetRenderFlags uint32  newflags  ) 
 

Definition at line 141 of file Tclip.c.

References ActiveRenderFlags, GENESISCC, geTClip_Statics, and geTClip_StaticsType::RenderFlags.

00142 {
00143         geTClip_Statics.RenderFlags = newflags;
00144         ActiveRenderFlags = newflags;
00145         return;
00146 }

GENESISAPI geBoolean GENESISCC geTClip_SetTexture const geBitmap Bitmap  ) 
 

Definition at line 197 of file Tclip.c.

References geTClip_StaticsType::Bitmap, GE_TRUE, geBitmap_GetTHandle(), geBoolean, GENESISCC, geTClip_Rasterize_Gou(), geTClip_Rasterize_Tex(), geTClip_Statics, NULL, geTClip_StaticsType::RasterizeFunc, and geTClip_StaticsType::THandle.

Referenced by gePuppet_DrawShadow(), and gePuppet_Render().

00198 {
00199         geTClip_Statics.Bitmap = Bitmap;
00200         if ( Bitmap )
00201         {
00202                 geTClip_Statics.THandle = geBitmap_GetTHandle(Bitmap);
00203                 assert(geTClip_Statics.THandle);
00204                 geTClip_Statics.RasterizeFunc = geTClip_Rasterize_Tex;
00205         }
00206         else
00207         {
00208                 geTClip_Statics.THandle = NULL;
00209                 geTClip_Statics.RasterizeFunc = geTClip_Rasterize_Gou;
00210         }
00211 return GE_TRUE;
00212 }

GENESISAPI void GENESISCC geTClip_SetupEdges geEngine Engine,
geFloat  LeftEdge,
geFloat  RightEdge,
geFloat  TopEdge,
geFloat  BottomEdge,
geFloat  BackEdge
 

Definition at line 214 of file Tclip.c.

References geTClip_StaticsType::BackEdge, geTClip_StaticsType::BottomEdge, geTClip_StaticsType::Driver, geEngine::DriverInfo, geTClip_StaticsType::Engine, Engine, GENESISCC, geTClip_Statics, geTClip_StaticsType::LeftEdge, Sys_DriverInfo::RDriver, geTClip_StaticsType::RightEdge, and geTClip_StaticsType::TopEdge.

Referenced by gePuppet_Render().

00221 { 
00222         assert(Engine);
00223         memset(&geTClip_Statics,0,sizeof(geTClip_Statics));
00224         geTClip_Statics.Engine          = Engine;
00225         geTClip_Statics.Driver          = Engine->DriverInfo.RDriver; //Engine_GetRDriver(Engine);
00226         geTClip_Statics.LeftEdge        = LeftEdge;
00227         geTClip_Statics.RightEdge       = RightEdge;
00228         geTClip_Statics.TopEdge         = TopEdge;
00229         geTClip_Statics.BottomEdge      = BottomEdge;
00230         geTClip_Statics.BackEdge        = BackEdge;
00231 }

GENESISAPI void GENESISCC geTClip_Triangle const GE_LVertex  TriVertex[3]  ) 
 

Definition at line 238 of file Tclip.c.

References BACK_CLIPPING_PLANE, GENESISCC, geTClip_TrianglePlane(), geTClip_TrianglePlane_Old(), TIMER_P, and TIMER_Q.

Referenced by gePuppet_DrawShadow(), and gePuppet_Render().

00239 {
00240 
00241         TIMER_P(TClip_Triangle);
00242 
00243 #if 1
00244         geTClip_TrianglePlane(TriVertex,BACK_CLIPPING_PLANE);
00245         //geTClip_TrianglePlane(TriVertex,LEFT_CLIPPING_PLANE);
00246 #else
00247         geTClip_TrianglePlane_Old(TriVertex,BACK_CLIPPING_PLANE);
00248 #endif
00249 
00250         TIMER_Q(TClip_Triangle);
00251 }

GENESISAPI void GENESISCC geTClip_UnclippedTriangle const GE_LVertex  TriVertex[3]  ) 
 

Definition at line 557 of file Tclip.c.

References ActiveRenderFlags, geTClip_StaticsType::Driver, GENESISCC, geTClip_Statics, DRV_Driver::RenderGouraudPoly, DRV_Driver::RenderMiscTexturePoly, and geTClip_StaticsType::THandle.

00558 {
00559         if ( geTClip_Statics.THandle )
00560         {
00561                 geTClip_Statics.Driver->RenderMiscTexturePoly((DRV_TLVertex *)TriVertex,
00562                         3,geTClip_Statics.THandle,ActiveRenderFlags);
00563         }
00564         else
00565         {
00566                 geTClip_Statics.Driver->RenderGouraudPoly((DRV_TLVertex *)TriVertex,3,ActiveRenderFlags);
00567         }
00568         return;
00569 }


Generated on Tue Sep 30 12:38:11 2003 for GTestAndEngine by doxygen 1.3.2