mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
Update guiMaterialPreview.cpp
use mSaveFrustm to keep states between object switches
This commit is contained in:
parent
925b73309e
commit
291c5c75b6
1 changed files with 3 additions and 2 deletions
|
|
@ -369,7 +369,8 @@ void GuiMaterialPreview::renderWorld(const RectI &updateRect)
|
|||
F32 left, right, top, bottom, nearPlane, farPlane;
|
||||
bool isOrtho;
|
||||
GFX->getFrustum( &left, &right, &bottom, &top, &nearPlane, &farPlane, &isOrtho);
|
||||
Frustum frust( isOrtho, left, right, bottom, top, nearPlane, farPlane, MatrixF::Identity );
|
||||
mSaveFrustum = Frustum( isOrtho, left, right, bottom, top, nearPlane, farPlane, MatrixF::Identity );
|
||||
mSaveFrustum.setTransform(MatrixF::Identity);
|
||||
|
||||
FogData savedFogData = gClientSceneGraph->getFogData();
|
||||
gClientSceneGraph->setFogData( FogData() ); // no fog in preview window
|
||||
|
|
@ -382,7 +383,7 @@ void GuiMaterialPreview::renderWorld(const RectI &updateRect)
|
|||
(
|
||||
gClientSceneGraph,
|
||||
SPT_Diffuse,
|
||||
SceneCameraState( GFX->getViewport(), frust, GFX->getWorldMatrix(), GFX->getProjectionMatrix() ),
|
||||
SceneCameraState( GFX->getViewport(), mSaveFrustum, GFX->getWorldMatrix(), GFX->getProjectionMatrix() ),
|
||||
renderPass,
|
||||
true
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue