mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +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;
|
F32 left, right, top, bottom, nearPlane, farPlane;
|
||||||
bool isOrtho;
|
bool isOrtho;
|
||||||
GFX->getFrustum( &left, &right, &bottom, &top, &nearPlane, &farPlane, &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();
|
FogData savedFogData = gClientSceneGraph->getFogData();
|
||||||
gClientSceneGraph->setFogData( FogData() ); // no fog in preview window
|
gClientSceneGraph->setFogData( FogData() ); // no fog in preview window
|
||||||
|
|
@ -382,7 +383,7 @@ void GuiMaterialPreview::renderWorld(const RectI &updateRect)
|
||||||
(
|
(
|
||||||
gClientSceneGraph,
|
gClientSceneGraph,
|
||||||
SPT_Diffuse,
|
SPT_Diffuse,
|
||||||
SceneCameraState( GFX->getViewport(), frust, GFX->getWorldMatrix(), GFX->getProjectionMatrix() ),
|
SceneCameraState( GFX->getViewport(), mSaveFrustum, GFX->getWorldMatrix(), GFX->getProjectionMatrix() ),
|
||||||
renderPass,
|
renderPass,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue