Explorar o código

The code didn't work out of the box

I think someone new to this won't know where to get the GraphicsContext from and since it is only that one most of the time this should get written into the docs.
Niklas Arndt %!s(int64=2) %!d(string=hai) anos
pai
achega
2cca8109ed
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      en/manual/graphics/low-level-api/spritebatch.md

+ 2 - 2
en/manual/graphics/low-level-api/spritebatch.md

@@ -36,7 +36,7 @@ The @'Stride.Graphics.SpriteBatch' class has multiple draw methods to set variou
 
 ```cs
 // begin the sprite batch operations
-spriteBatch.Begin(GraphicsContext, SpriteSortMode.Immediate);
+spriteBatch.Begin(Game.GraphicsContext, SpriteSortMode.Immediate);
  
 // draw the sprite immediately
 spriteBatch.Draw(myTexture, new Vector2(10, 20));
@@ -59,7 +59,7 @@ To set the mode, specify it in the @'Stride.Graphics.SpriteBatch.Begin' method.
 
 ```cs
 // begin the sprite batch operations
-spriteBatch.Begin(GraphicsContext); // same as spriteBatch.Begin(GraphicsContext, SpriteSortMode.Deferred);
+spriteBatch.Begin(Game.GraphicsContext); // same as spriteBatch.Begin(GraphicsContext, SpriteSortMode.Deferred);
 
 // store the modification of the sprite
 spriteBatch.Draw(myTexture, new Vector2(10, 20));