TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ RenderBackground()

void Terraria.Main.RenderBackground ( )
inlineprotected

Definition at line 70246 of file Main.cs.

70247 {
70248 //IL_001f: Unknown result type (might be due to invalid IL or missing references)
70249 //IL_0080: Unknown result type (might be due to invalid IL or missing references)
70250 if (drawToScreen)
70251 {
70252 return;
70253 }
70254 ((Game)this).GraphicsDevice.SetRenderTarget(backWaterTarget);
70255 ((Game)this).GraphicsDevice.Clear(Color.Transparent);
70256 spriteBatch.Begin();
70257 tileBatch.Begin();
70258 try
70259 {
70261 }
70262 catch
70263 {
70264 }
70265 tileBatch.End();
70266 spriteBatch.End();
70267 ((Game)this).GraphicsDevice.SetRenderTarget((RenderTarget2D)null);
70268 ((Game)this).GraphicsDevice.SetRenderTarget(backgroundTarget);
70269 ((Game)this).GraphicsDevice.Clear(Color.Transparent);
70270 spriteBatch.Begin();
70271 tileBatch.Begin();
70272 if (ignoreErrors)
70273 {
70274 try
70275 {
70277 }
70278 catch (Exception e)
70279 {
70280 TimeLogger.DrawException(e);
70281 }
70282 }
70283 else
70284 {
70286 }
70287 TimeLogger.DetailedDrawReset();
70288 tileBatch.End();
70289 spriteBatch.End();
70290 TimeLogger.DetailedDrawTime(33);
70291 ((Game)this).GraphicsDevice.SetRenderTarget((RenderTarget2D)null);
70292 }
RenderTarget2D backgroundTarget
Definition Main.cs:919
static SpriteBatch spriteBatch
Definition Main.cs:1043
static bool drawToScreen
Definition Main.cs:628
static TileBatch tileBatch
Definition Main.cs:1045
static bool ignoreErrors
Definition Main.cs:770
RenderTarget2D backWaterTarget
Definition Main.cs:907
void DrawWaters(bool isBackground=false)
Definition Main.cs:73121
void DrawBackground()
Definition Main.cs:67299

References Terraria.Main.backgroundTarget, Terraria.Main.backWaterTarget, Terraria.TimeLogger.DetailedDrawReset(), Terraria.TimeLogger.DetailedDrawTime(), Terraria.Main.DrawBackground(), Terraria.TimeLogger.DrawException(), Terraria.Main.drawToScreen, Terraria.Main.DrawWaters(), Terraria.UI.Game, Terraria.Main.ignoreErrors, Terraria.Main.spriteBatch, and Terraria.Main.tileBatch.

Referenced by Terraria.Main.DoDraw().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: