Scene SetViewportBackground Method (Material)Delta Engine Documentation

Namespace: DeltaEngine.Scenes
Assembly: DeltaEngine.Scenes (in DeltaEngine.Scenes.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void SetViewportBackground(
	Material material
)
Remarks

Tests: DeltaEngine.Scenes.Tests.SceneTests
Examples

3 unit tests call DeltaEngine.Scenes.Scene.SetViewportBackground(DeltaEngine.Content.Material)
[Test]
public void SetLandscapeViewportBackgroundOnLandscapeWindow()
{
    window.ViewportPixelSize = new Size(512, 288);
    scene.SetViewportBackground("CheckerboardImage512x288");
}
[Test]
public void SetPortraitViewportBackgroundOnPortraitWindow()
{
    window.ViewportPixelSize = new Size(288, 512);
    scene.SetViewportBackground("CheckerboardImage288x512");
}
[Test]
public void SetChangingViewport()
{
    window.ViewportPixelSize = new Size(288, 512);
    scene.SetViewportBackground("CheckerboardImage288x512");
    window.ViewportPixelSize = new Size(512, 288);
    scene.SetViewportBackground("CheckerboardImage512x288");
}
See Also