/// <summary>
/// Intializes graphics engine.
/// </summary>
public override void Initialize()
{
// init components :
InitializeComponent(spriteEngine);
InitializeComponent(filter);
InitializeComponent(ssaoFilter);
InitializeComponent(hdrFilter);
InitializeComponent(dofFilter);
InitializeComponent(lightRenderer);
InitializeComponent(sceneRenderer);
InitializeComponent(sky);
InitializeComponent(bitonicSort);
InitializeComponent(vtSystem);
// create default textures :
whiteTexture = new DynamicTexture(this, 4, 4, typeof(Color), false, false);
whiteTexture.SetData(Enumerable.Range(0, 16).Select(i => Color.White).ToArray());
grayTexture = new DynamicTexture(this, 4, 4, typeof(Color), false, false);
grayTexture.SetData(Enumerable.Range(0, 16).Select(i => Color.Gray).ToArray());
blackTexture = new DynamicTexture(this, 4, 4, typeof(Color), false, false);
blackTexture.SetData(Enumerable.Range(0, 16).Select(i => Color.Black).ToArray());
flatNormalMap = new DynamicTexture(this, 4, 4, typeof(Color), false, false);
flatNormalMap.SetData(Enumerable.Range(0, 16).Select(i => new Color(127, 127, 255, 127)).ToArray());
// set sprite layers :
SpriteLayers = new SpriteLayerCollection();
// add default render world :
renderWorld = new RenderWorld(Game, Width, Height);
DisplayBoundsChanged += (s, e) => renderWorld.Resize(DisplayBounds.Width, DisplayBounds.Height);
}