#include <Windows.H>#include "DCommon.h"Go to the source code of this file.
Defines | |
| #define | RENDER_NONE 0 |
| #define | RENDER_WORLD 1 |
| #define | RENDER_MESHES 2 |
| #define | RENDER_MODELS 3 |
Functions | |
| BOOL DRIVERCC | BeginScene (BOOL Clear, BOOL ClearZ, RECT *WorldRect) |
| BOOL DRIVERCC | EndScene (void) |
| BOOL DRIVERCC | BeginWorld (void) |
| BOOL DRIVERCC | EndWorld (void) |
| BOOL DRIVERCC | BeginMeshes (void) |
| BOOL DRIVERCC | EndMeshes (void) |
| BOOL DRIVERCC | BeginModels (void) |
| BOOL DRIVERCC | EndModels (void) |
Variables | |
| int32 | RenderMode |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 178 of file D3D7xDrv/Scene.cpp. References DRIVERCC, GlobalMeshHack, RENDER_MESHES, RenderMode, and TRUE.
00179 {
00180 GlobalMeshHack = TRUE;
00181 RenderMode = RENDER_MESHES;
00182 return TRUE;
00183 }
|
|
|
Definition at line 207 of file D3D7xDrv/Scene.cpp. References DRIVERCC, RENDER_MODELS, RenderMode, and TRUE.
00208 {
00209 RenderMode = RENDER_MODELS;
00210 return TRUE;
00211 }
|
|
||||||||||||||||
|
Definition at line 53 of file D3D7xDrv/Scene.cpp. References AppInfo, CacheInfo, CurrentLRU, D3DBilinearFilter(), D3DBlendEnable(), D3DBlendFunc(), D3DDRV, D3DErrorToString(), D3DMain_Log(), D3DPolygonMode(), D3DZEnable(), D3DZFunc(), D3DZWriteEnable(), DRIVERCC, DWORD, FALSE, App_Info::FogB, App_Info::FogEnable, App_Info::FogG, App_Info::FogR, GE_FALSE, App_Info::lpD3DDevice, Main_ClearBackBuffer(), DRV_Driver::NumRenderedPolys, App_Info::RenderingIsOK, THandle_CheckCache(), and TRUE.
00054 {
00055 HRESULT Result;
00056
00057 CurrentLRU++;
00058
00059 if (!AppInfo.lpD3DDevice)
00060 {
00061 D3DMain_Log("BeginScene: No D3D Device!.");
00062 return FALSE;
00063 }
00064
00065 // Make sure we clear the cache info structure...
00066 memset(&CacheInfo, 0, sizeof(DRV_CacheInfo));
00067
00068 if (!THandle_CheckCache())
00069 return GE_FALSE;
00070
00071 // Watch for inactive app or minimize
00072 if(AppInfo.RenderingIsOK)
00073 {
00074 if (!Main_ClearBackBuffer(Clear, ClearZ))
00075 {
00076 D3DMain_Log("D3DClearBuffers failed.");
00077 return FALSE;
00078 }
00079
00080 D3DDRV.NumRenderedPolys = 0;
00081
00082 Result = AppInfo.lpD3DDevice->BeginScene();
00083
00084 if (Result != D3D_OK)
00085 {
00086 D3DMain_Log("BeginScene: D3D BeginScene Failed.\n%s.", D3DErrorToString(Result));
00087 return FALSE;
00088 }
00089
00090 D3DBilinearFilter(D3DFILTER_LINEAR, D3DFILTER_LINEAR);
00091 D3DPolygonMode (D3DFILL_SOLID);
00092
00093 D3DZWriteEnable (TRUE);
00094 D3DZEnable(TRUE);
00095 D3DZFunc(D3DCMP_LESSEQUAL);
00096
00097 D3DBlendFunc (D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA);
00098 D3DBlendEnable(TRUE);
00099
00100 if (AppInfo.FogEnable)
00101 {
00102 AppInfo.lpD3DDevice->SetRenderState(D3DRENDERSTATE_FOGENABLE , TRUE);
00103 AppInfo.lpD3DDevice->SetRenderState(D3DRENDERSTATE_FOGCOLOR , ((DWORD)AppInfo.FogR<<16)|((DWORD)AppInfo.FogG<<8)|(DWORD)AppInfo.FogB);
00104 }
00105 else
00106 {
00107 AppInfo.lpD3DDevice->SetRenderState(D3DRENDERSTATE_FOGENABLE , FALSE);
00108 }
00109 }
00110
00111 return TRUE;
00112 }
|
|
|
Definition at line 141 of file D3D7xDrv/Scene.cpp. References AppInfo, ClientWindow, DRIVERCC, DRV_Window::Height, RENDER_WORLD, App_Info::RenderingIsOK, RenderMode, ResetSpans(), and TRUE.
00142 {
00143 #ifdef USE_SPANS
00144 if(AppInfo.RenderingIsOK)
00145 {
00146 ResetSpans(ClientWindow.Height);
00147 }
00148 #endif
00149
00150 RenderMode = RENDER_WORLD;
00151 return TRUE;
00152 }
|
|
|
Definition at line 185 of file D3D7xDrv/Scene.cpp. References AppInfo, DRIVERCC, FALSE, GlobalMeshHack, App_Info::lpD3DDevice, PCache_FlushMiscPolys(), PCache_FlushWorldPolys(), RENDER_NONE, App_Info::RenderingIsOK, RenderMode, and TRUE.
00186 {
00187 RenderMode = RENDER_NONE;
00188
00189 if(AppInfo.RenderingIsOK)
00190 {
00191 PCache_FlushMiscPolys();
00192 PCache_FlushWorldPolys();
00193
00194 #ifdef SUPER_FLUSH
00195 /* 02/28/2001 Wendell Buckner
00196 These render states are unsupported d3d 7.0
00197 AppInfo.lpD3DDevice->SetRenderState(D3DRENDERSTATE_FLUSHBATCH, 0);*/
00198 AppInfo.lpD3DDevice->EndScene();
00199 AppInfo.lpD3DDevice->BeginScene();
00200 #endif
00201
00202 GlobalMeshHack = FALSE;
00203 }
00204 return TRUE;
00205 }
|
|
|
Definition at line 213 of file D3D7xDrv/Scene.cpp. References AppInfo, DRIVERCC, App_Info::lpD3DDevice, PCache_FlushMiscPolys(), PCache_FlushWorldPolys(), RENDER_NONE, App_Info::RenderingIsOK, RenderMode, and TRUE.
00214 {
00215 RenderMode = RENDER_NONE;
00216
00217 if(AppInfo.RenderingIsOK)
00218 {
00219 PCache_FlushWorldPolys();
00220 PCache_FlushMiscPolys();
00221
00222 #ifdef SUPER_FLUSH
00223 /* 02/28/2001 Wendell Buckner
00224 These render states are unsupported d3d 7.0
00225 AppInfo.lpD3DDevice->SetRenderState(D3DRENDERSTATE_FLUSHBATCH, 0);*/
00226 AppInfo.lpD3DDevice->EndScene();
00227 AppInfo.lpD3DDevice->BeginScene();
00228 #endif
00229
00230 }
00231 return TRUE;
00232 }
|
|
|
Definition at line 114 of file D3D7xDrv/Scene.cpp. References AppInfo, D3DErrorToString(), D3DMain_Log(), DRIVERCC, FALSE, App_Info::lpD3DDevice, Main_ShowBackBuffer(), PCache_FlushMiscPolys(), PCache_FlushWorldPolys(), App_Info::RenderingIsOK, and TRUE.
00115 {
00116 HRESULT Result;
00117
00118 if (!AppInfo.lpD3DDevice)
00119 return FALSE;
00120
00121 if(AppInfo.RenderingIsOK)
00122 {
00123 // Flush everything one last time...
00124 PCache_FlushWorldPolys();
00125 PCache_FlushMiscPolys();
00126
00127 Result = AppInfo.lpD3DDevice->EndScene();
00128
00129 if (Result != D3D_OK)
00130 {
00131 D3DMain_Log("EndScene: D3D EndScene Failed.\n%s", D3DErrorToString(Result));
00132 return FALSE;
00133 }
00134
00135 if (!Main_ShowBackBuffer())
00136 return FALSE;
00137 }
00138 return TRUE;
00139 }
|
|
|
Definition at line 154 of file D3D7xDrv/Scene.cpp. References AppInfo, DRIVERCC, App_Info::lpD3DDevice, PCache_FlushMiscPolys(), PCache_FlushWorldPolys(), RENDER_NONE, App_Info::RenderingIsOK, RenderMode, and TRUE.
00155 {
00156 RenderMode = RENDER_NONE;
00157
00158 if(AppInfo.RenderingIsOK)
00159 {
00160 PCache_FlushWorldPolys();
00161 PCache_FlushMiscPolys();
00162
00163 assert(AppInfo.lpD3DDevice);
00164 #ifdef SUPER_FLUSH
00165 /* 02/28/2001 Wendell Buckner
00166 These render states are unsupported d3d 7.0
00167 AppInfo.lpD3DDevice->SetRenderState(D3DRENDERSTATE_FLUSHBATCH, 0);*/
00168 AppInfo.lpD3DDevice->EndScene();
00169 AppInfo.lpD3DDevice->BeginScene();
00170 #endif
00171
00172 }
00173 return TRUE;
00174 }
|
|
|
|
1.3.2