Skip to content

Commit e47ed69

Browse files
committed
xrEngine/device.h: renamed ***_saved -> ***Saved
And added new saved objects Layers/xrRender/DetailManager.cpp: removed unused View_old
1 parent 575d30f commit e47ed69

File tree

3 files changed

+20
-16
lines changed

3 files changed

+20
-16
lines changed

src/Layers/xrRender/DetailManager.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -239,14 +239,10 @@ extern ECORE_API float r_ssaDISCARD;
239239

240240
void CDetailManager::UpdateVisibleM()
241241
{
242-
Fvector EYE = RDEVICE.vCameraPosition_saved;
242+
Fvector EYE = Device.vCameraPositionSaved;
243243

244244
CFrustum View;
245-
View.CreateFromMatrix(RDEVICE.mFullTransform_saved, FRUSTUM_P_LRTB + FRUSTUM_P_FAR);
246-
247-
CFrustum View_old;
248-
Fmatrix Viewm_old = RDEVICE.mFullTransform;
249-
View_old.CreateFromMatrix(Viewm_old, FRUSTUM_P_LRTB + FRUSTUM_P_FAR);
245+
View.CreateFromMatrix(Device.mFullTransformSaved, FRUSTUM_P_LRTB + FRUSTUM_P_FAR);
250246

251247
float fade_limit = dm_fade;
252248
fade_limit = fade_limit * fade_limit;
@@ -425,7 +421,7 @@ void __stdcall CDetailManager::MT_CALC()
425421
if (m_frame_calc != RDEVICE.dwFrame)
426422
if ((m_frame_rendered + 1) == RDEVICE.dwFrame) // already rendered
427423
{
428-
Fvector EYE = RDEVICE.vCameraPosition_saved;
424+
Fvector EYE = RDEVICE.vCameraPositionSaved;
429425

430426
int s_x = iFloor(EYE.x / dm_slot_size + .5f);
431427
int s_z = iFloor(EYE.z / dm_slot_size + .5f);

src/xrEngine/device.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,15 @@ void CRenderDevice::on_idle()
260260
mFullTransform.mul(mProject, mView);
261261
GEnv.Render->SetCacheXform(mView, mProject);
262262
mInvFullTransform.invert(mFullTransform);
263-
vCameraPosition_saved = vCameraPosition;
264-
mFullTransform_saved = mFullTransform;
265-
mView_saved = mView;
266-
mProject_saved = mProject;
263+
264+
vCameraPositionSaved = vCameraPosition;
265+
vCameraDirectionSaved = vCameraDirection;
266+
vCameraTopSaved = vCameraTop;
267+
vCameraRightSaved = vCameraRight;
268+
269+
mFullTransformSaved = mFullTransform;
270+
mViewSaved = mView;
271+
mProjectSaved = mProject;
267272

268273
renderProcessFrame.Set(); // allow render thread to do its job
269274
syncProcessFrame.Set(); // allow secondary thread to do its job

src/xrEngine/device.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,14 @@ class ENGINE_API CRenderDeviceData
9191
Fmatrix mFullTransform;
9292

9393
// Copies of corresponding members. Used for synchronization.
94-
Fvector vCameraPosition_saved;
95-
96-
Fmatrix mView_saved;
97-
Fmatrix mProject_saved;
98-
Fmatrix mFullTransform_saved;
94+
Fvector vCameraPositionSaved;
95+
Fvector vCameraDirectionSaved;
96+
Fvector vCameraTopSaved;
97+
Fvector vCameraRightSaved;
98+
99+
Fmatrix mViewSaved;
100+
Fmatrix mProjectSaved;
101+
Fmatrix mFullTransformSaved;
99102

100103
float fFOV;
101104
float fASPECT;

0 commit comments

Comments
 (0)