Inheritance Hierarchy
DeltaEngine.Platforms TestWithMocksOrVisually
DeltaEngine.Rendering2D.Tests PerformanceTests
Namespace: DeltaEngine.Rendering2D.Tests
Assembly: DeltaEngine.Rendering2D.Tests (in DeltaEngine.Rendering2D.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The PerformanceTests type exposes the following members.
Constructors
Name | Description | |
---|---|---|
PerformanceTests | Initializes a new instance of the PerformanceTests class |
Methods
Name | Description | |
---|---|---|
AdvanceTimeAndUpdateEntities | (Inherited from TestWithMocksOrVisually.) | |
Draw10000SpritesPerFrame |
Draws 100*100 sprites each frame to test rendering performance (millions of polygons/s).
View code on GitHub | |
InitializeResolver | (Inherited from TestWithMocksOrVisually.) | |
RegisterMock T | (Inherited from TestWithMocksOrVisually.) | |
Resolve T | (Inherited from TestWithMocksOrVisually.) | |
RunAfterFirstFrame | (Inherited from TestWithMocksOrVisually.) | |
RunTestAndDisposeResolverWhenDone | (Inherited from TestWithMocksOrVisually.) |
Properties
Name | Description | |
---|---|---|
IsMockResolver | (Inherited from TestWithMocksOrVisually.) |
Examples
/// <summary> /// Draws 100*100 sprites each frame to test rendering performance (millions of polygons/s). /// </summary> [Test] public void Draw10000SpritesPerFrame() { var material = new Material(ShaderFlags.Position2DTextured, "DeltaEngineLogo"); for (int y = 0; y < 100; y++) for (int x = 0; x < 100; x++) new Sprite(material, new Rectangle(x / 100.0f, y / 100.0f, 0.01f, 0.01f)); new FpsDisplay(); }
See Also