protected override void LoadContent()
{
var parameters = myGraphics.GraphicsDevice.PresentationParameters;
graphdev = new GraphicsDevice(GraphicsAdapter.DefaultAdapter, graphprof, parameters);
mapr = new RenderTarget2D(GraphicsDevice, 800, 600, false, SurfaceFormat.Color, DepthFormat.Depth24);
Content.RootDirectory = "Content";
batch1 = new SpriteBatch(GraphicsDevice);
batch2 = new SpriteBatch(GraphicsDevice);
Map.load(Content, @"asd");
mainf = Content.Load<SpriteFont>("MAINFN");
mapTextData = new Color[800 * 600];
GraphicsDevice.Clear(Color.CornflowerBlue);
GraphicsDevice.SetRenderTarget(mapr);
batch1.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend);
Map.draw(batch1);
batch1.End();
GraphicsDevice.SetRenderTarget(null);
mapr.GetData<Color>(mapTextData);
}
protected override void Draw(GameTime gameTime)
{
batch2.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, null, null, null, null);
batch2.Draw(mapr, Vector2.Zero, Color.White);
Color a = dat[0];
string aa = string.Format("{0}", a);
batch2.DrawString(mainf, aa, new Vector2(33, 400), Color.Black);
batch2.End();
base.Draw(gameTime);
}