00001
00005 #pragma once
00006 #include "Engine.h"
00007 #include "UnRender.h"
00008 #include "d3d.h"
00009
00010 #define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } }
00011 #define CLAMP(p,min,max) { if(p < min) p = min; else if (p>max) p = max; }
00012
00013 class UD3D10RenderDevice:public URenderDevice
00014 {
00015
00016
00017 #if (UNREALTOURNAMENT || RUNE)
00018 DECLARE_CLASS(UD3D10RenderDevice,URenderDevice,CLASS_Config,D3D10Drv)
00019 #else
00020 DECLARE_CLASS(UD3D10RenderDevice,URenderDevice,CLASS_Config)
00021 #endif
00022
00023 private:
00024 D3D::Options D3DOptions;
00026 struct
00027 {
00028 int precache;
00029 int autoFOV;
00030 int FPSLimit;
00031 } options;
00032
00033 public:
00036 static void debugs(char *s);
00037 int getOption(TCHAR* name,int defaultVal, bool isBool);
00039
00042 UBOOL Init(UViewport *InViewport,INT NewX, INT NewY, INT NewColorBytes, UBOOL Fullscreen);
00043 UBOOL SetRes(INT NewX, INT NewY, INT NewColorBytes, UBOOL Fullscreen);
00044 void Exit();
00045 #if UNREALGOLD
00046 void Flush();
00047 #else
00048 void Flush(UBOOL AllowPrecache);
00049 #endif
00050 void Lock(FPlane FlashScale, FPlane FlashFog, FPlane ScreenClear, DWORD RenderLockFlags, BYTE* HitData, INT* HitSize );
00051 void Unlock(UBOOL Blit );
00052 void DrawComplexSurface(FSceneNode* Frame, FSurfaceInfo& Surface, FSurfaceFacet& Facet );
00053 void DrawGouraudPolygon( FSceneNode* Frame, FTextureInfo& Info, FTransTexture** Pts, int NumPts, DWORD PolyFlags, FSpanBuffer* Span );
00054 void DrawTile( FSceneNode* Frame, FTextureInfo& Info, FLOAT X, FLOAT Y, FLOAT XL, FLOAT YL, FLOAT U, FLOAT V, FLOAT UL, FLOAT VL, class FSpanBuffer* Span, FLOAT Z, FPlane Color, FPlane Fog, DWORD PolyFlags );
00055 void Draw2DLine( FSceneNode* Frame, FPlane Color, DWORD LineFlags, FVector P1, FVector P2 );
00056 void Draw2DPoint( FSceneNode* Frame, FPlane Color, DWORD LineFlags, FLOAT X1, FLOAT Y1, FLOAT X2, FLOAT Y2, FLOAT Z );
00057 void ClearZ( FSceneNode* Frame );
00058 void PushHit( const BYTE* Data, INT Count );
00059 void PopHit( INT Count, UBOOL bForce );
00060 void GetStats( TCHAR* Result );
00061 void ReadPixels( FColor* Pixels );
00063
00066 UBOOL Exec(const TCHAR* Cmd, FOutputDevice& Ar);
00067 void SetSceneNode( FSceneNode* Frame );
00068 void PrecacheTexture( FTextureInfo& Info, DWORD PolyFlags );
00069 void EndFlash();
00070 void StaticConstructor();
00072
00073 #ifdef RUNE
00074
00076 void DrawFogSurface(FSceneNode* Frame, FFogSurf &FogSurf);
00077 void PreDrawGouraud(FSceneNode *Frame, FLOAT FogDistance, FPlane FogColor);
00078 void PostDrawGouraud(FLOAT FogDistance);
00080 #endif
00081 };