private InitializeRenderPipeline ( |
||
sb | ||
gd | GraphicsDevice | |
gdm | GraphicsDeviceManager | |
return | void |
internal void InitializeRenderPipeline(SpriteBatch sb, GraphicsDevice gd, GraphicsDeviceManager gdm)
{
_RenderPipeline = new RenderPipeline(sb, gd, gdm);
_DisplayManager = new DisplayManager(
gameKernel,
_RenderPipeline,
GameConstants.BaseResolution,
GameConstants.InitialWindowTitle,
GameConstants.InitialBackgroundColour
);
}
sealed protected override void Initialize() { base.Initialize(); spriteBatch = new SpriteBatch(GraphicsDevice); // Due to Monogame's stupidity, we have to create the spriteBatch here, and not in // the most logical location (GameKernel's constructor OR even better, WE shouldn't // have to create it at all), we have to initialize the render pipeline from here. engine.InitializeRenderPipeline(spriteBatch, GraphicsDevice, graphics); }